-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[proxy] Remove ineffectual cors on /api/* and /headless-log-download* #13740
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
Conversation
started the job as gitpod-build-mp-proxy-api-cors.1 because the annotations in the pull request description changed |
/hold @easyCZ Can we wait with this PR until I had a chance to review, please? The segment of the API is a "cargo cult" artifact IIRC. But still I'd like to understand better why it's there before we remove it - even it turns out to be superfluous as you said. 👍 |
Sure, no problem. Check out the linked context for demonstration that the definition actually does not take any effect. |
@geropl PTAL when you get a chance. |
@easyCZ to me it looks like as we're still using and relying on it. This example is for the workspace auth cookie: Also, the fact that we don't see it on every request does not prove it's not effective (compare the allowedHeaders = []string{"Accept", "Authorization", "Cache-Control", "Content-Type", "DNT", "Keep-Alive", "Origin", "User-Agent", When looking at your example in the description:
The first response contains them, no?
Still could be missing sth though. 🤔 |
It does. Not sure how I missed this. Will run through this again to validate. Thanks for investigating. |
I'm starting a workspace on this preview env now to test if it just works 😬 |
Description
See context
Because the configuration results in
AllowedOrigins = ["*.<domain>"]
, it doesn't actually match anything because the AllowedOrigins must contain a URL (ie.https://*.gitpod.io
), rather than just the host.To prove the existing configuration does not work as intended, do the following requests:
Neither of these contain the required
Access-Control-Allow-*
headers on the responses.Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide