MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / end_headers

Method end_headers

test/test_browser.py:5628–5640  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5626
5627 # Add COOP, COEP, CORP, and no-caching headers
5628 def end_headers(self):
5629 self.send_header('Accept-Ranges', 'bytes')
5630 self.send_header('Access-Control-Allow-Origin', '*')
5631 self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
5632 self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
5633 self.send_header('Cross-Origin-Resource-Policy', 'cross-origin')
5634
5635 self.send_header('Cache-Control', 'no-cache, no-store, must-revalidate, private, max-age=0')
5636 self.send_header('Expires', '0')
5637 self.send_header('Pragma', 'no-cache')
5638 self.send_header('Vary', '*') # Safari insists on caching if this header is not present in addition to the above
5639
5640 return SimpleHTTPRequestHandler.end_headers(self)
5641
5642 if '-sEXPORT_ES6' in args:
5643 create_file('test.html', f'<script src="http://localhost:{port}/hello.js" type="module"></script>')

Callers 1

sendheadersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected