mirror of
https://github.com/titaniumnetwork-dev/Ultraviolet.git
synced 2025-05-17 13:30:00 -04:00
Allow embedding of ultraviolet in an isolated origin
This commit is contained in:
parent
3f920ee7b4
commit
520c634f65
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') {
|
||||
responseCtx.headers['content-type'] = 'text/event-stream';
|
||||
}
|
||||
if (crossOriginIsolated) {
|
||||
responseCtx.headers['Cross-Origin-Embedder-Policy'] = 'require-corp';
|
||||
}
|
||||
|
||||
this.emit('response', resEvent);
|
||||
if (resEvent.intercepted) return resEvent.returnValue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue