Skip to content

Commit

Permalink
Workers module scripts should use hosts[alt][] instead of hosts[alt][…
Browse files Browse the repository at this point in the history
…0] (#41861)
  • Loading branch information
youennf authored Sep 7, 2023
1 parent a0d78df commit a2cc026
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import a remote origin script.
const import_url =
'http://{{hosts[alt][0]}}:{{ports[http][0]}}/workers/modules/resources/export-credentials.py';
'http://{{hosts[alt][]}}:{{ports[http][0]}}/workers/modules/resources/export-credentials.py';
if ('DedicatedWorkerGlobalScope' in self &&
self instanceof DedicatedWorkerGlobalScope) {
import(import_url)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import a remote origin script.
import * as module from 'http://{{hosts[alt][0]}}:{{ports[http][0]}}/workers/modules/resources/export-credentials.py';
import * as module from 'http://{{hosts[alt][]}}:{{ports[http][0]}}/workers/modules/resources/export-credentials.py';
if ('DedicatedWorkerGlobalScope' in self &&
self instanceof DedicatedWorkerGlobalScope) {
postMessage(module.cookie);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import a remote origin script.
import * as module from 'https://{{hosts[alt][0]}}:{{ports[https][0]}}/workers/modules/resources/export-on-load-script.py';
import * as module from 'https://{{hosts[alt][]}}:{{ports[https][0]}}/workers/modules/resources/export-on-load-script.py';
if ('DedicatedWorkerGlobalScope' in self &&
self instanceof DedicatedWorkerGlobalScope) {
self.onmessage = e => {
Expand Down

0 comments on commit a2cc026

Please sign in to comment.