update: improve cors checking logic
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m44s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m44s
This commit is contained in:
@ -78,7 +78,7 @@ func NewHTTPServer() error {
|
|||||||
if isAllowedAllCors {
|
if isAllowedAllCors {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
isAllowed, ok := allowedCors[r.Host]
|
isAllowed, ok := allowedCors[r.Header.Get("Origin")]
|
||||||
if !ok || !isAllowed {
|
if !ok || !isAllowed {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user