@galda/cli 0.10.81 → 0.10.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/engine/lib.mjs +7 -1
- package/package.json +1 -1
package/engine/lib.mjs
CHANGED
|
@@ -97,8 +97,14 @@ export function rebasePreviewUrl(declaredUrl, serverUrl) {
|
|
|
97
97
|
const declared = new URL(declaredUrl);
|
|
98
98
|
const server = new URL(serverUrl);
|
|
99
99
|
const params = new URLSearchParams(declared.search);
|
|
100
|
+
// The isolated preview is a different Manager instance with its own
|
|
101
|
+
// secret.key. A worker declaration can carry the parent instance's stale
|
|
102
|
+
// `key`, but that credential can never authenticate the ephemeral server.
|
|
103
|
+
// Preserve all artifact parameters while making the target server the
|
|
104
|
+
// authority for authentication.
|
|
105
|
+
if (server.searchParams.has('key')) params.delete('key');
|
|
100
106
|
for (const [key, value] of server.searchParams) {
|
|
101
|
-
if (!params.has(key)) params.set(key, value);
|
|
107
|
+
if (!params.has(key) || key === 'key') params.set(key, value);
|
|
102
108
|
}
|
|
103
109
|
server.pathname = declared.pathname || '/';
|
|
104
110
|
server.search = params.toString();
|
package/package.json
CHANGED