Fix problems with CORS and websocket allowed origins

This commit is contained in:
Matthew Penner
2020-09-10 21:08:00 -06:00
parent 0cd8dc2b5f
commit e10844d32c
3 changed files with 16 additions and 12 deletions

View File

@@ -64,6 +64,10 @@ func GetHandler(s *server.Server, w http.ResponseWriter, r *http.Request) (*Hand
}
for _, origin := range config.Get().AllowedOrigins {
if origin == "*" {
return true
}
if o != origin {
continue
}