Skip to content

Throw if CORS policy is configured to allow credentials and any origin #7751

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

Merged
merged 2 commits into from
Feb 21, 2019

Conversation

pranavkm
Copy link
Contributor

Fixes #3106

Changes per #3106 (comment)

@pranavkm pranavkm requested a review from Tratcher as a code owner February 20, 2019 18:01
@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 20, 2019
@@ -224,6 +224,11 @@ public CorsPolicyBuilder SetIsOriginAllowedToAllowWildcardSubdomains()
/// <returns>The constructed <see cref="CorsPolicy"/>.</returns>
public CorsPolicy Build()
{
if (_policy.AllowAnyOrigin && _policy.SupportsCredentials)
Copy link
Member

Choose a reason for hiding this comment

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

What about Combine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You have to call Build to get to the the result of Combine.

@pranavkm pranavkm changed the base branch from master to release/3.0-preview3 February 21, 2019 14:22
@pranavkm pranavkm merged commit 51e2bea into release/3.0-preview3 Feb 21, 2019
@pranavkm pranavkm deleted the prkrishn/3106 branch February 21, 2019 17:06
halter73 added a commit that referenced this pull request Feb 22, 2019
@halter73 halter73 mentioned this pull request Feb 22, 2019
halter73 added a commit that referenced this pull request Feb 22, 2019
halter73 added a commit that referenced this pull request Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants