also turn show-trace parameters into http urls
This commit is contained in:
parent
4bdd5105e4
commit
9d88147b80
|
|
@ -106,8 +106,16 @@ export async function installRootRedirect(server: HttpServer, traceUrls: string[
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
if (path.sep !== path.posix.sep)
|
if (path.sep !== path.posix.sep)
|
||||||
params.set('pathSeparator', path.sep);
|
params.set('pathSeparator', path.sep);
|
||||||
for (const traceUrl of traceUrls)
|
for (const traceUrl of traceUrls) {
|
||||||
|
if (traceUrl.startsWith('http://') || traceUrl.startsWith('https://')) {
|
||||||
params.append('trace', traceUrl);
|
params.append('trace', traceUrl);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const url = new URL('/trace/file', server.urlPrefix('precise'));
|
||||||
|
url.searchParams.set('path', traceUrl);
|
||||||
|
params.append('trace', url.toString());
|
||||||
|
}
|
||||||
if (server.wsGuid())
|
if (server.wsGuid())
|
||||||
params.append('ws', server.wsGuid()!);
|
params.append('ws', server.wsGuid()!);
|
||||||
if (options?.isServer)
|
if (options?.isServer)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue