dendrite-demo-pinecone: Accept any origin

This commit is contained in:
Neil Alexander 2021-06-22 15:39:29 +01:00
parent 79181f2348
commit 6ae976a55a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 9 additions and 5 deletions

View file

@ -212,7 +212,11 @@ func main() {
base.PublicMediaAPIMux,
)
wsUpgrader := websocket.Upgrader{}
wsUpgrader := websocket.Upgrader{
CheckOrigin: func(_ *http.Request) bool {
return true
},
}
httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath()
httpRouter.PathPrefix(httputil.InternalPathPrefix).Handler(base.InternalAPIMux)
httpRouter.PathPrefix(httputil.PublicClientPathPrefix).Handler(base.PublicClientAPIMux)