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

@@ -16,7 +16,7 @@ func SetAccessControlHeaders(c *gin.Context) {
o := c.GetHeader("Origin")
if o != config.Get().PanelLocation {
for _, origin := range config.Get().AllowedOrigins {
if o != origin {
if origin != "*" && o != origin {
continue
}