summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-27 00:40:13 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-27 00:40:13 -0400
commit9182d5c887040da31285d53deab735097f68ba1a (patch)
tree695e5a73aa0987c5d7d062e5b3b9b69192fd46df /src
parentinitial (diff)
downloadldap_forwardauth-9182d5c887040da31285d53deab735097f68ba1a.tar.gz
ldap_forwardauth-9182d5c887040da31285d53deab735097f68ba1a.tar.bz2
ldap_forwardauth-9182d5c887040da31285d53deab735097f68ba1a.zip
a
Diffstat (limited to 'src')
-rw-r--r--src/web/index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/index.php b/src/web/index.php
index ffd6b06..932fc84 100644
--- a/src/web/index.php
+++ b/src/web/index.php
@@ -53,11 +53,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$host = $_SERVER['HTTP_HOST'];
$env = getenv("HTTP_HOST");
- if ($host != $env) {
+ if ($_SERVER['REQUEST_URI'] !== '/login') {
// we are being forwarded authed
// redirect
http_response_code(301);
- header("Location: https://$env");
+ header("Location: https://$env/login");
} else {
page('login', array(
'title' => 'Login'