-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enable CORS in ASP.NET Core and ASP .NET Framework #633
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ettings.json (or GX_CORS_ALLOW_ORIGIN in environment variables)
Cherry pick to beta failed, 1 conflicted file in commit 5287a7c
|
Manual cherry pick to beta success |
ggallotti
previously approved these changes
Jul 21, 2022
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.
👍
claudiamurialdo
changed the title
Enable CORS in ASP.NET Core
Enable CORS in ASP.NET Core and ASP .NET Framework
Jul 21, 2022
Manual cherry pick to beta success |
Cherry pick to beta success |
Cherry pick to beta success |
Cherry pick to beta success |
Cherry pick to beta success |
Cherry pick to beta success |
Those headers add automatically added by services.AddCors that defines the cors policy at Startup.
Cherry pick to beta success |
Cherry pick to beta success |
Test is disabled in master.
Cherry pick to beta success |
Add trace to print origins added to cors policy.
Cherry pick to beta success |
ggallotti
previously approved these changes
Sep 20, 2022
Cherry pick to beta failed, 0 conflicted files in commit fbc3cc3 (warning: no changes merged) |
Manual cherry pick to beta success |
Cherry pick to beta failed, 1 conflicted file in commit fb6093a
|
Manual cherry pick to beta success |
…IS handler OPTIONSVerbHandler intercepts the request (it depends on the handler mappings order in IIS configuration). To solve it a PostResolveRequestCache event is added to API module that makes a RemapHandler to OptionsApiObjectRequestHandler. Do not encode Allow header values since they are encoded later by framework.
Cherry pick to beta success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is enabled when CORS_ALLOW_ORIGIN is defined at appsettings.json.
As well as when the GX_CORS_ALLOW_ORIGIN environment variable is defined.
Still missing implementation for the .NET framework.
Issue:96724