зеркало из https://github.com/mozilla/hubs-ops.git
restrict worker response
This commit is contained in:
Родитель
c7145a3e20
Коммит
a0cb51337d
|
@ -58,6 +58,8 @@ addEventListener("fetch", (event) => {
|
|||
|
||||
responseHeaders.set("Vary", "Origin");
|
||||
responseHeaders.set("X-Content-Type-Options", "nosniff");
|
||||
responseHeaders.set("Content-Security-Policy", "default-src 'none'");
|
||||
responseHeaders.delete("Set-Cookie");
|
||||
|
||||
const responseContentType = (responseHeaders.get("Content-Type") || "").toLowerCase();
|
||||
if (responseContentType.includes("script") || responseContentType.includes("html")) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче