mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
server: fix isUserFetch check
This commit is contained in:
parent
e00baf6853
commit
3dd083fc1c
1 changed files with 3 additions and 1 deletions
|
@ -171,7 +171,9 @@ func (gmx *Gomuks) Authenticate(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isUserFetch(header http.Header) bool {
|
func isUserFetch(header http.Header) bool {
|
||||||
return header.Get("Sec-Fetch-Site") == "none" &&
|
return (header.Get("Sec-Fetch-Site") == "none" ||
|
||||||
|
header.Get("Sec-Fetch-Site") == "same-site" ||
|
||||||
|
header.Get("Sec-Fetch-Site") == "same-origin") &&
|
||||||
header.Get("Sec-Fetch-Mode") == "navigate" &&
|
header.Get("Sec-Fetch-Mode") == "navigate" &&
|
||||||
header.Get("Sec-Fetch-Dest") == "document" &&
|
header.Get("Sec-Fetch-Dest") == "document" &&
|
||||||
header.Get("Sec-Fetch-User") == "?1"
|
header.Get("Sec-Fetch-User") == "?1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue