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

UseCors Must Come Before UseResponseCaching #1111

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

RehanSaeed
Copy link
Member

Fixes #1106.

@RehanSaeed RehanSaeed added maintenance Pull requests that perform maintenance on the project but add no features or bug fixes. patch Pull requests requiring a patch version update according to semantic versioning. labels Apr 29, 2021
@github-actions github-actions bot added template/API The Swagger API project template template/GraphQL The GraphQL project template labels Apr 29, 2021
@RehanSaeed
Copy link
Member Author

Now I remember why UseCors is where it is:

System.InvalidOperationException : Endpoint Health checks contains CORS metadata, but a middleware was not found that supports CORS.
 Configure your application startup by adding app.UseCors() inside the call to Configure(..) in the application startup code. The call to app.UseCors() must appear between app.UseRouting() and app.UseEndpoints(...).

@RehanSaeed RehanSaeed merged commit e91608d into main Apr 29, 2021
@RehanSaeed RehanSaeed deleted the use-cors-before-response-caching branch April 29, 2021 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Pull requests that perform maintenance on the project but add no features or bug fixes. patch Pull requests requiring a patch version update according to semantic versioning. template/API The Swagger API project template template/GraphQL The GraphQL project template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UseCors must be called before UseResponseCaching
1 participant