Skip to content

Forward `Access-Control-Allow-*` headers coming from HTTP server running in Workspace

Description

I’m using Workspaces in the Web IDE project, which has a complex system for loading assets. It uses an 'extensions host' web worker that runs on a different origin (usually a CDN) to request JavaScript files from the Web IDE’s server. Since these requests cross origins, the Web IDE server needs to include Access-Control-Allow-* headers to ensure the browser allows them. The Web IDE server is behind the gitlab-workspaces-proxy, but the latter is not forwarding the CORS headers set by the former.

image.png

As a result, we can't run the Web IDE test server in a Workspace.

image.png

Acceptance criteria

  • Forward the Access-Control-Allow headers set by an HTTP server running behind this proxy.
Edited by Enrique Alcántara