fix(sdk,client): use origin as postmessage target
arcad/edge/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2023-04-13 11:35:31 +02:00
parent 310dac296f
commit de330c0042
3 changed files with 5 additions and 4 deletions

View File

@ -3990,7 +3990,7 @@ var Edge = (() => {
return; return;
} }
const token = this._getAuthCookieToken(); const token = this._getAuthCookieToken();
evt.source.postMessage({ type: EdgeAuthTokenResponse, data: { token } }); evt.source.postMessage({ type: EdgeAuthTokenResponse, data: { token } }, evt.origin);
} }
_onConnectionMessage(evt) { _onConnectionMessage(evt) {
const rawMessage = JSON.parse(evt.data); const rawMessage = JSON.parse(evt.data);

File diff suppressed because one or more lines are too long

View File

@ -172,7 +172,8 @@ export class Client extends EventTarget {
} }
const token = this._getAuthCookieToken(); const token = this._getAuthCookieToken();
evt.source.postMessage({ type: EdgeAuthTokenResponse, data: { token }}); // @ts-ignore
evt.source.postMessage({ type: EdgeAuthTokenResponse, data: { token }}, evt.origin);
} }
_onConnectionMessage(evt) { _onConnectionMessage(evt) {