mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22: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
|
@ -121,7 +121,7 @@ func main() {
|
|||
queryAPI, aliasAPI, accountDB, deviceDB, federation, keyRing,
|
||||
userUpdateProducer, syncProducer,
|
||||
)
|
||||
common.SetupHTTPAPI(http.DefaultServeMux, api)
|
||||
common.SetupHTTPAPI(http.DefaultServeMux, common.WrapHandlerInCORS(api))
|
||||
|
||||
log.Fatal(http.ListenAndServe(string(cfg.Listen.ClientAPI), nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue