mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
properly proxy worker postmessae
This commit is contained in:
parent
35eb307d4d
commit
4f5ae7b18a
4 changed files with 36 additions and 5 deletions
|
@ -23,6 +23,8 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
return this.ports;
|
||||
},
|
||||
source() {
|
||||
if (this.source === null) return null;
|
||||
|
||||
const scram: ScramjetClient = this.source[SCRAMJETCLIENT];
|
||||
|
||||
if (scram) return scram.globalProxy;
|
||||
|
@ -33,7 +35,6 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
if (typeof this.data === "object" && "$scramjet$origin" in this.data)
|
||||
return this.data.$scramjet$origin;
|
||||
|
||||
// then it must be from a worker, which we aren't currently rewriting
|
||||
return client.url.origin;
|
||||
},
|
||||
data() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue