mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 05:46:28 +03:00
fix(trace-viewer): keep searchParams on / redirect (#27956)
Relates to https://github.com/microsoft/playwright/issues/27952. Might help future users too.
This commit is contained in:
parent
a55fe8fd1f
commit
326c9785b4
@ -119,9 +119,9 @@ async function startTraceViewerServer(traceUrls: string[], options?: OpenTraceVi
|
||||
const searchQuery = params.length ? '?' + params.join('&') : '';
|
||||
const urlPath = `/trace/${app || 'index.html'}${searchQuery}`;
|
||||
|
||||
server.routePath('/', (_, response) => {
|
||||
server.routePath('/', (request, response) => {
|
||||
response.statusCode = 302;
|
||||
response.setHeader('Location', urlPath);
|
||||
response.setHeader('Location', urlPath + request.url!.substring(1));
|
||||
response.end();
|
||||
return true;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user