-
Notifications
You must be signed in to change notification settings - Fork 0
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
place endpoint are added #3
Conversation
почему мы храним это в папке auth, если это никак с авторизацией не связано |
8e9e0a9
to
3f8090f
Compare
internal/pkg/middleware/cors.go
Outdated
w.Header().Set("Access-Control-Allow-Methods", "POST,PUT,DELETE,GET") | ||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type") | ||
w.Header().Set("Access-Control-Allow-Credentials", "true") | ||
w.Header().Set("Access-Control-Allow-Origin", r.Header.Get("Origin")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот это плохо. Суть CORS в том, что бэкенд отдает этим заголовком информацию браузеру, с каких сайтов (Origin) пропускать запросы на бэк. А мы таким образом будем позволять браузеру отправлять запросы на бэк с любого сайта. В общем смотри инфу про cors (например тут).
* place endpoint are added * errors fixed * json * nginx are added * errors fixed * docker changed * errors fixed * errors fixed * errors fixed * errors fixed * errors fixed
* place endpoint are added * errors fixed * json * nginx are added * errors fixed * docker changed * errors fixed * errors fixed * errors fixed * errors fixed * errors fixed
* place endpoint are added * errors fixed * json * nginx are added * errors fixed * docker changed * errors fixed * errors fixed * errors fixed * errors fixed * errors fixed
No description provided.