diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-11-26 13:05:21 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-11-26 13:05:21 -0500 |
| commit | 180eaef3dbd12f39b74dc02ee68a35fdb23ca3a6 (patch) | |
| tree | 0bc9cae8846981dacf4a27296772bd889f425a0e | |
| parent | fix redirect (diff) | |
| download | ldap_forwardauth-180eaef3dbd12f39b74dc02ee68a35fdb23ca3a6.tar.gz ldap_forwardauth-180eaef3dbd12f39b74dc02ee68a35fdb23ca3a6.tar.bz2 ldap_forwardauth-180eaef3dbd12f39b74dc02ee68a35fdb23ca3a6.zip | |
read x-forwarded
| -rw-r--r-- | src/web/router.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/router.php b/src/web/router.php index 55f17c3..572e4d9 100644 --- a/src/web/router.php +++ b/src/web/router.php @@ -83,7 +83,11 @@ class Router { } private function get_redirect(): string { - $redirect = $_GET['redirect'] ?? $this->get_post_info('redirect') ?? ''; + $redirect = + $this->get_post_info('redirect') ?? + $_GET['redirect'] ?? + $_SERVER['HTTP_X_FORWARDED_HOST'] ?? + ''; if (is_array($redirect)) { $redirect = $redirect['redirect']; } |