fix: prevent public status redirect loop
This commit is contained in:
@@ -20,10 +20,16 @@ location = /quant-os/status/index.html {
|
||||
return 308 https://$host/quant-os/status/;
|
||||
}
|
||||
|
||||
location ^~ /quant-os/status/ {
|
||||
root /srv/www;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
location = /quant-os/status/ {
|
||||
alias /srv/www/quant-os/status/index.html;
|
||||
default_type text/html;
|
||||
add_header Cache-Control "no-cache" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
}
|
||||
|
||||
location ^~ /quant-os/status/ {
|
||||
root /srv/www;
|
||||
try_files $uri =404;
|
||||
add_header Cache-Control "no-cache" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
}
|
||||
|
||||
@@ -1475,14 +1475,14 @@ window.QUANT_OS_PUBLIC_STATUS = {
|
||||
"provenance": {
|
||||
"baselineConfig": "configs/baseline.json",
|
||||
"bundleManifest": "dist/bundle_manifest.json",
|
||||
"payloadSha256": "9aae5da8e1d92fd28cfd7d6bef50774c4981b2baac1728ccd3153729234a88f0",
|
||||
"payloadSha256": "d2acea085dbb251b317071c11d2eeb1e778c9246f9b390e58cb137d84dae241c",
|
||||
"payloadSha256Semantics": "SHA-256 of canonical payload before payloadSha256 is added.",
|
||||
"platformMatrix": "docs/PLATFORM_MATRIX.md",
|
||||
"production80Assessment": "profiles/production-80/current-assessment.json",
|
||||
"production80Standard": "profiles/production-80/standard.json",
|
||||
"releaseReachability": "releases/quant60-research-candidate-v1/reachability.json",
|
||||
"scorecard": "gate_scorecard.json",
|
||||
"sourceSetSha256": "6d906cde8df07f8fae2f2faf05679a476ceae8f5173533b3b67beecc710b2f61",
|
||||
"sourceSetSha256": "66699c1afb92b39abc2f41fdbe43578d9b507215dc0f28914953dc73edd3463f",
|
||||
"sources": [
|
||||
{
|
||||
"path": "gate_scorecard.json",
|
||||
@@ -1582,7 +1582,7 @@ window.QUANT_OS_PUBLIC_STATUS = {
|
||||
},
|
||||
{
|
||||
"path": "ops/nginx/quant-os-static.conf",
|
||||
"sha256": "10b1c338c22caa0d4c4f68c1213d6c297a367995601dece7dd19df561b0c002e"
|
||||
"sha256": "9fcf5f96ad3807060bd1529124dcbfda4e10c3ef93947434ba9a106bbe2a392e"
|
||||
},
|
||||
{
|
||||
"path": "ops/nginx/quant-os-legacy-redirects-302.conf",
|
||||
|
||||
@@ -128,8 +128,15 @@ class ProjectScaffoldTests(unittest.TestCase):
|
||||
config = (
|
||||
PROJECT / "ops/nginx/quant-os-static.conf"
|
||||
).read_text(encoding="utf-8")
|
||||
self.assertIn("location = /quant-os/status/ {", config)
|
||||
self.assertIn(
|
||||
"alias /srv/www/quant-os/status/index.html;",
|
||||
config,
|
||||
)
|
||||
self.assertIn("location ^~ /quant-os/status/", config)
|
||||
self.assertIn("root /srv/www;", config)
|
||||
self.assertNotIn("index index.html;", config)
|
||||
self.assertNotIn("try_files $uri $uri/", config)
|
||||
self.assertIn(
|
||||
"https://$host/quant-os/status/",
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user