diff options
author | Andrew Dolgov <[email protected]> | 2017-06-15 23:10:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-15 23:10:03 +0300 |
commit | ed369290049fe436b6619729bf4bd029ca584159 (patch) | |
tree | 6b54fdd6272de26500fe7a391ed59e7b946ff3a8 /index.php | |
parent | 05e155454dbf7a797e35f022fa2e0d4729bd83fb (diff) |
force redirect to index.php to make sure offline works via service worker request override
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,11 @@ $owner = SQLite3::escapeString($_SERVER["PHP_AUTH_USER"]); + if (basename($_SERVER['REQUEST_URI']) != 'index.php') { + header('Location: index.php'); + exit; + } + if (!$owner) { header($_SERVER["SERVER_PROTOCOL"]." 401 Unauthorized"); echo "Unauthorized"; |