Skip to content

Commit

Permalink
feat: enable cors Access-Control-Allow-Credentials (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaiba authored and brennanjl committed Feb 26, 2024
1 parent 164bc4b commit d56f8ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/services/grpc_gateway/middleware/cors/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func MCors(cors []string) *middleware.NamedMiddleware {
w.Header().Set("Access-Control-Allow-Origin", r.Header.Get("Origin"))
w.Header().Set("Access-Control-Allow-Methods", AllowMethods)
w.Header().Set("Access-Control-Allow-Headers", AllowHeaders)
w.Header().Set("Access-Control-Allow-Credentials", "true")
}

if r.Method == "OPTIONS" {
Expand Down

0 comments on commit d56f8ca

Please sign in to comment.