Age gate skip header

master
Noah 2023-07-01 15:59:24 -07:00
parent 777fd85085
commit ba053900de
1 changed files with 1 additions and 1 deletions

View File

@ -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
}