-
Notifications
You must be signed in to change notification settings - Fork 334
nginz cannon additional cors domains (multi-domain backend) #3368
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
nginz cannon additional cors domains (multi-domain backend) #3368
Conversation
jschaul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine; can you test once that, if additional_external_env_domains is empty, that there is no difference to before?
Yes, sure. |
The workaround so far was to use randomport_allowlisted_origins. However, this opens/offers much more than we want.
bb78dad to
e8814e0
Compare
|
@jschaul , the default case ( map $http_origin $cors_header {
default "";
"https://webapp.sven-test.wire.link" "$http_origin";
"https://teams.sven-test.wire.link" "$http_origin";
"https://account.sven-test.wire.link" "$http_origin";
# Allow additional origins at random ports. This is useful for testing with an HTTP proxy.
# It should not be used in production.
} I did this on |
|
Now, that I see this in comparison: |
That was a red herring 🐟 . The staging config renders like map $http_origin $cors_header {
default "";
"https://wire-teams-staging." "$http_origin";
"https://wire-teams-dev." "$http_origin";
"https://wire-teams-ey." "$http_origin";
"https://wire-account-staging." "$http_origin";
"https://wire-webapp-edge." "$http_origin";
"https://wire-webapp-master." "$http_origin";
"https://wire-webapp-mls." "$http_origin";
"https://wire-webapp-dev." "$http_origin";
"https://wire-webapp-qa." "$http_origin";
"https://wire-calling-testtool-staging." "$http_origin";
"https://secure-alert-console.integrations." "$http_origin";
"https://wire-ealarming-staging." "$http_origin";
"https://outlook.integrations." "$http_origin";
# Allow additional origins at random ports. This is useful for testing with an HTTP proxy.
# It should not be used in production.
"~^https?://localhost(:[0-9]{2,5})?$" "$http_origin";
"~^https?://local.zinfra.io(:[0-9]{2,5})?$" "$http_origin";
} |
We're adding CORS headers with nginx rules. This PR extends the
maprule for CORS headers to support multi domain (multi-ingress) configurations.Rendered for
nginz:Rendered for
cannon:Jira Issue: WPB-1137
Checklist
changelog.d