Skip to content
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

VS Code Launch inside WebView #8

Closed
CraigRegester opened this issue Nov 2, 2022 · 6 comments
Closed

VS Code Launch inside WebView #8

CraigRegester opened this issue Nov 2, 2022 · 6 comments

Comments

@CraigRegester
Copy link

Hey John! The extension is working great when accessed externally holding down the alt-key but I can't seem to get it to work launching inside webview.

Attached a screenshot from ISC Web Gateway trace showing what gets logged during the launch inside VS Code. I'm struggling to understand why it is returning a 404. I have it proxied through IIS 10 for SSL, Cert is trusted, and CSPms is set w/ * so proxying everything.

IIS logs show much of the same. Do we need to explicitly enable CORS in IIS to permit the preflight checks? Curious what your web.config looks like.

2022-11-02 15:21:52 127.0.0.1 OPTIONS /terminal-vscode/ - 443 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Code/1.72.2+Chrome/102.0.5005.167+Electron/19.0.17+Safari/537.36 - 404 0 0 18

Using latest GA version of Server Manager.

image

@gjsjohnmurray
Copy link
Owner

Looks similar to #6

@gjsjohnmurray
Copy link
Owner

Does VS Code get as far as opening a tab? If so, does the content look like this?

image

Does your Server Manager entry define a non-empty username property?

@CraigRegester
Copy link
Author

Yea it looks like that. Triple checked all of the bullets and of course it works in the external browser.

Server Manager entry indeed defines a non-empty username.

Also tried setting the httpProxy to not be strict as the letsencrypt cert chain has gotten a bit odd lately.

It's like IIS w/ ISC Web Gateway doesn't properly ferry the OPTIONS call back through. I was tinkering with a React app that calls REST APIs in IRIS (though with apache) and I had to basically force apache to handle the OPTIONS/CORS response and then had success past that point. I'm not 100% on how to do that with IIS but I'll see if I can figure it out.

@CraigRegester
Copy link
Author

Relevant ISC documentation link

The IMPORTANT call out at the bottom of the section linked above seems pertinent and related to the callouts you made, so that makes sense but does better explain the reasoning. Of particular note, it explains why the 404 is returned for an OPTIONS call if privileges aren't addressed.

Going to dig into that a bit and see if I can figure out what's happening. Will reply back.

@gjsjohnmurray
Copy link
Owner

@CraigRegester I am doing some housekeeping. Are you still using this extension?

@CraigRegester
Copy link
Author

Thanks for checking John - Not using this at the moment so all good here. Do what you need to do re housekeeping. :)

@gjsjohnmurray gjsjohnmurray closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants