Skip to content

Commit

Permalink
feat/added-authorization-header-in-cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandra Kacprzak committed Oct 11, 2024
1 parent a7b30c6 commit 9cba5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/internal/common/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func WithCORS(next http.Handler) http.Handler {
// Allow requests from all origins
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Access-Control-Allow-Origin, Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers")
w.Header().Set("Access-Control-Allow-Headers", "Access-Control-Allow-Origin, Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization")
w.Header().Set("Access-Control-Allow-Credentials", "true")

if r.Method == http.MethodOptions {
Expand Down

0 comments on commit 9cba5b3

Please sign in to comment.