Merge pull request #38 from CoolElectronics/main
Allow embedding of ultraviolet in an isolated origin
This commit is contained in:
commit
096240d55a
1 changed files with 3 additions and 0 deletions
|
|
@ -266,6 +266,9 @@ class UVServiceWorker extends Ultraviolet.EventEmitter {
|
||||||
if (requestCtx.headers.accept === 'text/event-stream') {
|
if (requestCtx.headers.accept === 'text/event-stream') {
|
||||||
responseCtx.headers['content-type'] = 'text/event-stream';
|
responseCtx.headers['content-type'] = 'text/event-stream';
|
||||||
}
|
}
|
||||||
|
if (crossOriginIsolated) {
|
||||||
|
responseCtx.headers['Cross-Origin-Embedder-Policy'] = 'require-corp';
|
||||||
|
}
|
||||||
|
|
||||||
this.emit('response', resEvent);
|
this.emit('response', resEvent);
|
||||||
if (resEvent.intercepted) return resEvent.returnValue;
|
if (resEvent.intercepted) return resEvent.returnValue;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue