test(runtime): verify live same-origin canary
This commit is contained in:
@@ -256,6 +256,14 @@ export function createCanaryGateway(options: CanaryGatewayOptions): CanaryGatewa
|
||||
return sendText(response, 405, 'Method Not Allowed');
|
||||
}
|
||||
|
||||
// Browsers request this implicitly. Avoid a noisy console 404 without routing
|
||||
// this file-like path through the SPA fallback.
|
||||
if (pathname === '/favicon.ico') {
|
||||
response.writeHead(204, { 'cache-control': 'no-cache' });
|
||||
response.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const distRoot = await realpath(resolve(options.distDir)).catch(() => resolve(options.distDir));
|
||||
if (pathname !== '/' && (await serveFile(request, response, distRoot, pathname))) return;
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user