mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
If no origin header is set for WebSocket, do not fail upgrade (#9287)
This commit is contained in:
committed by
George Goldberg
parent
5876b52ecd
commit
9599f1a52f
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user