Age gate skip header
parent
777fd85085
commit
ba053900de
|
@ -67,7 +67,7 @@ func AgeGate(next http.Handler) http.Handler {
|
||||||
ses := session.Get(r)
|
ses := session.Get(r)
|
||||||
if val, _ := ses.Values["age-ok"].(bool); !val {
|
if val, _ := ses.Values["age-ok"].(bool); !val {
|
||||||
// They haven't been verified. Redirect them to the age-verify handler.
|
// 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)
|
responses.Redirect(w, r, "/age-verify?next="+path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue