-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
pass webview URIs as is #6282
Comments
I wonder should not we rather redesign the endpoint to send URIs as is without trying to make them part of a URL, as proposed here: #5619 (comment) The issue is that browsers can modify URLs i.e. remove cc @svenefftinge @olexii4 @eclipse-theia/plugin-system |
@akosyakov can you explain this, please? vscode extensions might want to push html content like this |
VS Code hooks into and then pass the serialized path as query in order to avoid modifying it: https://github.com/TypeFox/vscode/blob/70b8db24a37fafc77247de7f7cb5bb0195120ed0/src/vs/workbench/contrib/webview/common/resourceLoader.ts#L60-L67 |
@AlexTugarev Will this approach solve also the python webview scenario? |
Description
in the plugin system we're patching the html content forwarded to webviews by replacing
vscode-resource:/
with/webview/
in the assumption that the context path of theia is/
. this will break if you put e.g. an nginx proxy in front of theia and use a location prefix. the expectation is then that the path is/some/prefix/webview
with will be passed to the/webview
endpoint of theia's express server.#5619 tried to solve this issue by turning them into relative urls; I reverted in #6279 because it broke the webviews from python extension.
an alternative approach to solve this issue is described briefly in #6279 (comment); the idea is to make it configurable.
cc. @amiramw
The text was updated successfully, but these errors were encountered: