0

I am using the "C4 DSL Extension" of VSCode to show previews of my architecture diagrams. The previews are rendered through the WebviewPanel. The source code can be found here: https://gitlab.com/systemticks/c4-grammar/-/blob/master/extension/src/c4-structurizr-preview.ts

It works through a direct connection, but once connected with my corporate network, all requests have to pass through a proxy. VSCode itself handles proxies through the http_proxy and https_proxy variables. However, the WebviewPanel does not seem to take those settings.

The following figure shows an excerpt of the console. You can see, that the request to query the "structurizr-embed.js" failed. enter image description here

Is this behavior intended? I could not find a setting in VSCode to enable WebviewPanel to request via proxy.

Note: I am using the Linux version of VSCode.

Christophe
75.1k7 gold badges87 silver badges183 bronze badges
asked Jan 10, 2022 at 9:16

1 Answer 1

0

I found a solution by setting the http.proxy variable in VSCode. We are using authentication for proxies and previously I exported the http_proxy environment variable in the form of http_proxy=http://<username>:<password>@<host>:<port>.

However, VSCode expects this variable without credentials: http_proxy=http://<host>:<port>. Now I don't understand where it talks the credentials from, but it works.

answered Jan 12, 2022 at 12:35
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.