Skip to content

Commit

Permalink
headers path
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Feb 3, 2025
1 parent 2ce0b11 commit ab87053
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 3 additions & 0 deletions frontend/static/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
9 changes: 1 addition & 8 deletions functions/api/[[path]].ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ export async function onRequest(context) {
?.split("token")
.pop() ?? ""
);
newResponse.headers.set(
"Cross-Origin-Opener-Policy",
"same-origin"
);
newResponse.headers.set(
"Cross-Origin-Embedder-Policy",
"require-corp"
);

return newResponse;
} catch (e) {
return new Response(e.message, { status: 500 });
Expand Down

0 comments on commit ab87053

Please sign in to comment.