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

CORS Origin URL 프론트 url 로 한정해서 명시하기 #16

Open
kckc0608 opened this issue Jan 20, 2025 · 0 comments
Open

CORS Origin URL 프론트 url 로 한정해서 명시하기 #16

kckc0608 opened this issue Jan 20, 2025 · 0 comments
Labels
chore 사소한 변경 사항

Comments

@kckc0608
Copy link
Member

kckc0608 commented Jan 20, 2025

📌문제 상황

  • 지금은 모든 origin 에서 허용하고 있어서 프론트가 아니라 다른 사람들도 자유롭게 우리 서버 api 를 호출 할 수 있습니다.
    따라서 프론트에서 사용하는 origin 으로 한정해서 허용해야 합니다!
  • 로컬, 개발 서버에서는 프론트 리액트에서 자주 사용하는 localhost:5173, 5174하고, 기존 vercel 배포 url 을 같이 허용하면 좋을 것 같고, 운영 서버에서는 vercel 배포 url 만 허용하면 좋을 것 같습니다!
  • CORS 설정하는 부분이 시큐리티 필터에도 있습니다! 참고해주세여..!
  • 시큐리티 필터 설정만으로 cors 설정이 된다면 WebConfig 는 제거하면 좋을 것 같습니다.
@kckc0608 kckc0608 added 🐞bug 버그 발생 chore 사소한 변경 사항 and removed 🐞bug 버그 발생 labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore 사소한 변경 사항
Projects
None yet
Development

No branches or pull requests

1 participant