Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

adding CORS package and configured it #432

Merged
merged 7 commits into from
Nov 26, 2023

Conversation

ahmetkudu
Copy link
Contributor

Pull Request Description:

Overview
This pull request addresses Cross-Origin Resource Sharing (CORS) configuration in the SpringSecurityCorsApplication class. The primary goal is to allow requests from specified origins, methods, and headers to enhance the security and accessibility of the Spring Security application.

Changes Made
I have added a CORS filter using the addCorsMappings method from WebMvcConfigurer. The configuration allows requests from "http://localhost:3000/," "http://localhost/," and all origins (*). It permits all HTTP methods and headers for increased flexibility during development.

Context
CORS configuration is crucial for handling requests from different origins, especially when dealing with frontend applications running on different domains. This setup is beneficial for development environments, enabling seamless communication between a Spring Security backend and a frontend application hosted on "http://localhost:3000/" or "http://localhost/."

Additional Notes
Please review the changes and feel free to provide feedback or suggestions for improvement. Thank you!

@ahmetkudu ahmetkudu added type: enhancement New feature or request priority: medium Medium priority task status: review-needed After the issue is completed by the assignee, this label should be chosen to be reviewed by another team: backend Backend team labels Nov 22, 2023
@ahmetkudu ahmetkudu added this to the Milestone 2 milestone Nov 22, 2023
@ahmetkudu ahmetkudu linked an issue Nov 22, 2023 that may be closed by this pull request
Copy link
Contributor

@ohbahadiroglu ohbahadiroglu left a comment

Choose a reason for hiding this comment

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

PR should be to the develop branch not to main. could you please make that change?

@ahmetkudu ahmetkudu changed the base branch from main to develop November 25, 2023 19:47
@ohbahadiroglu ohbahadiroglu merged commit 4389177 into develop Nov 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
priority: medium Medium priority task status: review-needed After the issue is completed by the assignee, this label should be chosen to be reviewed by another team: backend Backend team type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend] Adding the CORS package
4 participants