diff options
Diffstat (limited to 'plugins/websockets/origin.go')
-rw-r--r-- | plugins/websockets/origin.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/plugins/websockets/origin.go b/plugins/websockets/origin.go deleted file mode 100644 index c6d9c9b8..00000000 --- a/plugins/websockets/origin.go +++ /dev/null @@ -1,28 +0,0 @@ -package websockets - -import ( - "strings" -) - -func isOriginAllowed(origin string, cfg *Config) bool { - if cfg.allowedAll { - return true - } - - origin = strings.ToLower(origin) - // simple case - origin = strings.ToLower(origin) - for _, o := range cfg.allowedOrigins { - if o == origin { - return true - } - } - // check wildcards - for _, w := range cfg.allowedWOrigins { - if w.match(origin) { - return true - } - } - - return false -} |