Skip to content

Commit

Permalink
Match Synapse's CORS headers
Browse files Browse the repository at this point in the history
  • Loading branch information
spantaleev committed Jul 10, 2021
1 parent daf2d56 commit 1b99787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corporal/httpgateway/handler/catchall.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func (me *catchAllHandler) actionCatchAll(w http.ResponseWriter, r *http.Request
logger.Debugf("HTTP gateway: replying to OPTIONS")

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", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Date")
w.WriteHeader(http.StatusOK)
return
}
Expand Down

0 comments on commit 1b99787

Please sign in to comment.