diff options
| author | adnano <[email protected]> | 2020-09-27 22:06:08 -0400 |
|---|---|---|
| committer | adnano <[email protected]> | 2020-09-27 22:06:08 -0400 |
| commit | 554e0af32a9fa70a68fe887ade194cbae5643d60 (patch) | |
| tree | ad3b3939e8531878e49bef473e529077ff4b9a69 /examples | |
| parent | Use helper functions throughout (diff) | |
| download | go-gemini-554e0af32a9fa70a68fe887ade194cbae5643d60.tar.xz go-gemini-554e0af32a9fa70a68fe887ade194cbae5643d60.zip | |
Split Redirect into two functions
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/auth/auth.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/auth/auth.go b/examples/auth/auth.go index 519c3e1..2ea5b78 100644 --- a/examples/auth/auth.go +++ b/examples/auth/auth.go @@ -81,7 +81,7 @@ func login(rw *gmi.ResponseWriter, req *gmi.Request) { sessions[fingerprint] = &session{ username: username, } - gmi.Redirect(rw, req, "/login/password", false) + gmi.Redirect(rw, req, "/login/password") } } else { gmi.CertificateRequired(rw, req) @@ -102,7 +102,7 @@ func loginPassword(rw *gmi.ResponseWriter, req *gmi.Request) { expected := logins[session.username].password if password == expected { session.authorized = true - gmi.Redirect(rw, req, "/profile", false) + gmi.Redirect(rw, req, "/profile") } else { gmi.SensitiveInput(rw, req, "Wrong password. Try again") } |