Theia webviews and virtual hosting?

I am having some issues with webviews on my machine: When building the repo’s example browser application I cannot access webviews (such as spawned by the Markdown: Open Preview command). I am running Windows 10 with Firefox 80.0.1. It works with Chrome or Edge. It worked with Firefox on someone else’s machine.

Then we’ve had issue with a service that hosted Theia instances where the webviews wouldn’t load, the URL was not resolved (and I suspect that it failed to resolve the virtual host for some reason, despite being https).

At this point I’m mostly looking for an explanation of how this stack is meant to work? We use virtual hosting, but how is the browser supposed to know that when fetching a resource on a virtual host it needs to use the main host’s IP? Is there any DNS configuration needed?

cc @akosyakov

Yes, you need some DNS configuration or a proxy: https://github.com/eclipse-theia/theia/pull/6465#issuecomment-557494879

1 Like

With DNS, I understand that we would configure it in a way where *.foo. resolves to the same IP as foo.?

But I don’t understand how the proxy way would work.

right, you will need DNS configuration anyway, proxy probably is irrelevant