feat: add manual production deployment pipeline
Deploy EG-BIM QA Gateway / deploy (push) Failing after 7s

This commit is contained in:
root committed 2026-10-28 14:14:02 +09:00
1 parent 1808f14cc6
commit 0755155368
13 files changed
+1391 -5

No files matched your search

+3 -1
View File
@@ -42,7 +42,8 @@ export default {
return Response.redirect(new URL(url.pathname + '/', url), 301);
}
const objectKey = objectKeyForPath(url.pathname);
const assetPrefix = String(env.QA_ASSET_PREFIX || '').replace(/^\/+|\/+$/g, '');
const objectKey = (assetPrefix ? assetPrefix + '/' : '') + objectKeyForPath(url.pathname);
let object = await env.QA_BUCKET.get(objectKey);
if (!object && objectKey.endsWith('/index.html')) {
object = await env.QA_BUCKET.get(objectKey.replace(/\/index\.html$/, 'index.html'));
@@ -54,6 +55,7 @@ export default {
headers.set('etag', object.httpEtag);
headers.set('x-content-type-options', 'nosniff');
headers.set('referrer-policy', 'strict-origin-when-cross-origin');
if (assetPrefix) headers.set('x-qa-release', assetPrefix);
headers.set('cache-control', url.pathname.endsWith('.html') || url.pathname.endsWith('.js') ? 'no-cache' : 'public, max-age=3600');
return new Response(request.method === 'HEAD' ? null : object.body, { headers });
} catch (error) {