refactor: Replace custom X-Auth-Redirect header with standard HTTP redirect for unauthorized access.
All checks were successful
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 20s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 1m25s
Build & Deploy KLZ Cables / 🏗️ Build & Push (push) Successful in 2m47s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 30s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s

This commit is contained in:
2026-02-01 16:52:57 +01:00
parent fcb3169d04
commit 950ef9d463
2 changed files with 923 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ app.get('/verify', (req, res) => {
const proto = req.headers['x-forwarded-proto'] || 'https';
// Redirect to login
res.status(401).set('X-Auth-Redirect', `${proto}://${host}/gatekeeper/login?redirect=${encodeURIComponent(originalUrl)}`).send('Unauthorized');
res.redirect(`${proto}://${host}/gatekeeper/login?redirect=${encodeURIComponent(originalUrl)}`);
});
// Login page