Skip to content

[V2] Documentation - Breaking change for Reverse proxy #1089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NickBolles opened this issue Oct 22, 2019 · 4 comments
Closed

[V2] Documentation - Breaking change for Reverse proxy #1089

NickBolles opened this issue Oct 22, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@NickBolles
Copy link

  • code-server version: v10.15.1
  • OS Version: docker:latest
  • VS Code Version:
Version: 1.39.2
Commit: f133b00851c6c05aedaf78ff139443a46cd8d036
Date: 2019-10-21T22:06:51.355Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36

Description

I have a similar issue to #997 after upgrading to V2, but it's different enough to warrent a separate issue.

I'm getting a 404, not found after upgrade for all web views (extension readme's, markdown preview etc.). But I don't think it's code-server's fault it's my reverse proxy config. I'm not sure the exact changes, but I think because I have some path matchers on my reverse proxy it's rejecting /webview paths as not found. because something obviously changed between v1 and v2, it should probably be documented.

@NickBolles NickBolles added the bug Something isn't working label Oct 22, 2019
@sr229
Copy link
Contributor

sr229 commented Oct 23, 2019

Duplicate of #997

@sr229 sr229 marked this as a duplicate of #997 Oct 23, 2019
@sr229 sr229 closed this as completed Oct 23, 2019
@NickBolles
Copy link
Author

@sr229 just an FYI, I'm not sure it's a direct duplicate. I'm actually getting 404 responses from my reverse proxy.
I don't get the following console message documented in the related issue

Service Workers are not enabled. Webviews will not work properly
Blocked script execution in 'http://0.0.0.0:8080/webview/fake.html?id=extensionEditor' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Instead I get a 404 with my reverse-proxy 404 page. If code-server was erroring out on the server it would be a 5** error.

webviewElement.ts:167 GET https://myDomain.com/webview/index.html?id=extensionEditor 404
mountTo @ webviewElement.ts:167
show @ dynamicWebviewEditorOverlay.ts:95
claim @ dynamicWebviewEditorOverlay.ts:57
openMarkdown @ extensionEditor.ts:585
async function (async)
openMarkdown @ extensionEditor.ts:579
openReadme @ extensionEditor.ts:826
open @ extensionEditor.ts:568
onNavbarChange @ extensionEditor.ts:556
(anonymous) @ extensionEditor.ts:425
fire @ event.ts:582
_update @ extensionEditor.ts:120
push @ extensionEditor.ts:105
updateTemplate @ extensionEditor.ts:428

as well as

The script has an unsupported MIME type ('text/html').

Which makes sense because what was returned was my reverse proxy 404 html page

@code-asher
Copy link
Member

This was my fault; I accidentally excluded the webview HTML from the final build. It should be fixed in the latest v2 Docker image.

@NickBolles
Copy link
Author

@code-asher confirmed! Thank you for all of the awesome work!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants