Skip to content
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
merged 25 commits into from
Sep 23, 2022
Merged

Conversation

claudiamurialdo
Copy link
Collaborator

@claudiamurialdo claudiamurialdo commented Jul 20, 2022

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

…ettings.json (or GX_CORS_ALLOW_ORIGIN in environment variables)
@genexusbot
Copy link
Collaborator

Cherry pick to beta failed, 1 conflicted file in commit 5287a7c
  • dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests July 20, 2022 19:09 Inactive
@genexusbot genexusbot added the conflict Conflict merging to beta branch label Jul 20, 2022
@genexusbot
Copy link
Collaborator

Manual cherry pick to beta success

@genexusbot genexusbot removed the conflict Conflict merging to beta branch label Jul 20, 2022
ggallotti
ggallotti previously approved these changes Jul 21, 2022
Copy link
Member

@ggallotti ggallotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests July 21, 2022 17:28 Inactive
@claudiamurialdo claudiamurialdo changed the title Enable CORS in ASP.NET Core Enable CORS in ASP.NET Core and ASP .NET Framework Jul 21, 2022
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests July 22, 2022 17:38 Inactive
@genexusbot
Copy link
Collaborator

Manual cherry pick to beta success

@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests July 23, 2022 12:25 Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests August 4, 2022 17:58 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests August 4, 2022 19:54 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@genexusbot
Copy link
Collaborator

Cherry pick to beta success

Those headers add automatically added by services.AddCors that defines the cors policy at Startup.
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests August 5, 2022 16:46 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@genexusbot
Copy link
Collaborator

Cherry pick to beta success

Test is disabled in master.
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

Add trace to print origins added to cors policy.
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

ggallotti
ggallotti previously approved these changes Sep 20, 2022
@genexusbot
Copy link
Collaborator

Cherry pick to beta failed, 0 conflicted files in commit fbc3cc3 (warning: no changes merged)

@genexusbot genexusbot added the conflict Conflict merging to beta branch label Sep 20, 2022
@genexusbot
Copy link
Collaborator

Manual cherry pick to beta success

@genexusbot genexusbot removed the conflict Conflict merging to beta branch label Sep 21, 2022
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests September 21, 2022 12:08 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta failed, 1 conflicted file in commit fb6093a
  • dotnet/test/DotNetCoreUnitTest/DotNetCoreUnitTest.csproj

@genexusbot genexusbot added the conflict Conflict merging to beta branch label Sep 21, 2022
@genexusbot
Copy link
Collaborator

Manual cherry pick to beta success

@genexusbot genexusbot removed the conflict Conflict merging to beta branch label Sep 21, 2022
…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.
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests September 22, 2022 14:11 Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo merged commit 9c369d9 into master Sep 23, 2022
@claudiamurialdo claudiamurialdo deleted the cors branch September 23, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants