Allow to embed the presentation in window
Similar like in:
commit d9d13d7092
wasm: support serving wasm files
add headers required when we use WASM so we are able to
embed presentation in window.
Without that we get:
not-set Cross-Origin-Embedder-Policy
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I03ca3717488a92fe405693764f3f18a964b23bf7
pull/8802/head
parent
1ff9451754
commit
01a30b03f1
|
@ -1489,6 +1489,15 @@ void ClientRequestDispatcher::handlePostRequest(const RequestDetails& requestDet
|
|||
if (serveAsAttachment && contentType != "image/svg+xml")
|
||||
response.set("Content-Disposition", "attachment; filename=\"" + fileName + '"');
|
||||
|
||||
#if !MOBILEAPP
|
||||
if (COOLWSD::WASMState != COOLWSD::WASMActivationState::Disabled)
|
||||
{
|
||||
response.add("Cross-Origin-Opener-Policy", "same-origin");
|
||||
response.add("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
response.add("Cross-Origin-Resource-Policy", "cross-origin");
|
||||
}
|
||||
#endif // !MOBILEAPP
|
||||
|
||||
try
|
||||
{
|
||||
HttpHelper::sendFileAndShutdown(socket, filePath.toString(), response);
|
||||
|
|
Loading…
Reference in New Issue