Skip to content

Commit

Permalink
emrun: Set COOP,COEP and CORP headers (#10077)
Browse files Browse the repository at this point in the history
* emrun: Set COOP,COEP and CORP headers

This enables emrun to serve pages by taking into account
the upcoming restrictions on Content Policy for Firefox 72.

In Firefox 71, we currently need to set these flags to test the
upcoming feature:
browser.tabs.remote.useCORP
browser.tabs.remote.useCrossOriginOpenerPolicy
browser.tabs.remote.useCrossOriginEmbedderPolicy
dom.postMessage.sharedArrayBuffer.withCOOP_COEP

* fixup: remove semicolons
  • Loading branch information
msabwat authored and juj committed Jan 3, 2020
1 parent ef45532 commit 8d3c6e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions emrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ def pid_existed(pid):
self.send_header('Connection', 'close')
self.send_header('Expires', '-1')
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
self.send_header('Cross-Origin-Resource-Policy', 'cross-origin')
self.end_headers()
page_last_served_time = tick()
return f
Expand Down

0 comments on commit 8d3c6e1

Please sign in to comment.