mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Add CORS headers to all responses including errors (#364)
This commit is contained in:
parent
bc3dd821f9
commit
578d8cf492
6 changed files with 27 additions and 7 deletions
|
@ -85,7 +85,7 @@ func main() {
|
|||
|
||||
api := mux.NewRouter()
|
||||
routing.Setup(api, deviceDB, db)
|
||||
common.SetupHTTPAPI(http.DefaultServeMux, api)
|
||||
common.SetupHTTPAPI(http.DefaultServeMux, common.WrapHandlerInCORS(api))
|
||||
|
||||
log.Fatal(http.ListenAndServe(string(cfg.Listen.PublicRoomsAPI), nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue