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

[Backend] Adding the CORS package #369

Closed
ahmetkudu opened this issue Nov 7, 2023 · 2 comments · Fixed by #432
Closed

[Backend] Adding the CORS package #369

ahmetkudu opened this issue Nov 7, 2023 · 2 comments · Fixed by #432
Assignees
Labels
area: meeting Meeting is required priority: high High priority task status: inprogress This task is currently being developed team: backend Backend team
Milestone

Comments

@ahmetkudu
Copy link
Contributor

ahmetkudu commented Nov 7, 2023

Problem

Currently, the frontend does not redirect to 8000 when a request is made with 3000. To fix this, the CORS package will be installed and implemented.

Solution

Install CORS Package.
Configure CORS in backend code.
Test your application by making a request from port 3000 to see if the redirection to port 8000 now occurs without CORS issues.

Documentation

Report in the pull request description.

Additional notes

No response

Reviewers

Emre Sin

Deadline

14.11.2023 - 23.59

@ahmetkudu ahmetkudu added status: todo This issue or pull request already exists priority: high High priority task area: meeting Meeting is required team: backend Backend team labels Nov 7, 2023
@ahmetkudu ahmetkudu self-assigned this Nov 7, 2023
@ahmetkudu ahmetkudu added status: inprogress This task is currently being developed and removed status: todo This issue or pull request already exists labels Nov 21, 2023
@ahmetkudu ahmetkudu added this to the Milestone 2 milestone Nov 21, 2023
@ahmetkudu
Copy link
Contributor Author

In the backend, @CrossOrigin(origins = ["*"]) was located near request mappings to reach the endpoints provided with the @PostMapping or @GetMapping annotations. This was a temporary solution for the Milestone 1 presentation. Actually, @CrossOrigin(origins = ["*"]) is a bit problematic in terms of the security. So, the asterisk means the server allows any origin essentially. This is the default setting that developers use for a fully public API. However, we don't let everyone access the endpoint that we have. We only want to be accessed by the users of our platform. We can achieve this issue by using the CORS(Cross-Origin Resource Sharing).

@ahmetkudu ahmetkudu linked a pull request Nov 22, 2023 that will close this issue
@ahmetkudu
Copy link
Contributor Author

completed successfully in the pull request.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: meeting Meeting is required priority: high High priority task status: inprogress This task is currently being developed team: backend Backend team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant