diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/api.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/api.go b/utils/api.go index d14f316b6..6e513b3ea 100644 --- a/utils/api.go +++ b/utils/api.go @@ -19,6 +19,10 @@ import ( func CheckOrigin(r *http.Request, allowedOrigins string) bool { origin := r.Header.Get("Origin") + if origin == "" { + return true + } + if allowedOrigins == "*" { return true } |