Skip to content

Conversation

@mayank2424
Copy link

@mayank2424 mayank2424 commented Dec 26, 2024

Changes

  • CORS Middleware enhancement
    • Added logic to allow all origins if configValue.Server.AllowedOrigins is not set or contains an empty value.
    • Updated the middleware to return a 403 - Forbidden error response when an origin is not allowed.
    • Ensured that the Access-Control-Allow-Origin header is set correctly for preflight (OPTIONS) requests.

@mayank2424
Copy link
Author

@lucifercr07 Updated the logic to handle CORS origins. Please let me know if you have any questions.

@mayank2424 mayank2424 changed the title Bug - Added logic to handle CORS allowed origins and aborting request for non-allowed origins Change - Added logic to handle CORS allowed origins and aborting request for non-allowed origins Dec 26, 2024
@mayank2424
Copy link
Author

Hey @lucifercr07 @arpitbbhayani have you had a chance to review this PR?

@mayank2424
Copy link
Author

Hey @lucifercr07 Could you please review this PR?

cc: @arpitbbhayani

@mayank2424
Copy link
Author

Hey @lucifercr07 Could you please review this PR?

cc: @arpitbbhayani

Hey @lucifercr07 Have you got a chance to look at this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant