Age gate skip header
This commit is contained in:
parent
777fd85085
commit
ba053900de
|
@ -67,7 +67,7 @@ func AgeGate(next http.Handler) http.Handler {
|
|||
ses := session.Get(r)
|
||||
if val, _ := ses.Values["age-ok"].(bool); !val {
|
||||
// They haven't been verified. Redirect them to the age-verify handler.
|
||||
if r.FormValue("over18") == "" {
|
||||
if r.FormValue("over18") == "" && r.Header.Get("X-Over-18") == "" {
|
||||
responses.Redirect(w, r, "/age-verify?next="+path)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user