fix(deploy): prevent stale SPA entry caching

This commit is contained in:
2026-09-02 20:41:51 +08:00
parent 12424281c7
commit 4ee8ac3ee7
2 changed files with 20 additions and 0 deletions
+6
View File
@@ -13,6 +13,12 @@ test('allows 50 MiB uploads with multipart overhead through both API proxies', (
assert.equal(config.match(/client_max_body_size 55m;/g)?.length, 2)
})
test('does not cache the SPA entry while keeping hashed assets immutable', () => {
assert.match(config, /location = \/index\.html[\s\S]*no-store, no-cache, must-revalidate/)
assert.match(config, /location \/assets\/[\s\S]*max-age=31536000, immutable/)
assert.match(config, /location \/ \{[\s\S]*no-store, no-cache, must-revalidate[\s\S]*try_files \$uri \$uri\/ \/index\.html/)
})
test('routes domestic and overseas browser APIs to their test gateways without duplicate api prefixes', () => {
assert.match(testCompose, /API_UPSTREAM: "http:\/\/test-api-cn\.buggoglobal\.com"/)
assert.match(testCompose, /OVERSEAS_API_UPSTREAM: "http:\/\/test-api-global\.buggoglobal\.com"/)