Skip to content

Commit

Permalink
fix build, add Permissions-Policy & Access-Control-Allow-Origin headers
Browse files Browse the repository at this point in the history
  • Loading branch information
fennifith committed Feb 16, 2024
1 parent 0ae1446 commit 5136317
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/layouts/barebones.astro
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,5 @@ lang ??= "en";
</head>
<body>
<slot />

<script>
import { enableHrefContainers } from "utils/href-container-script";
window.addEventListener("load", enableHrefContainers);
</script>
</body>
</html>
8 changes: 8 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
{
"source": "/(.*)",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "https://unicorn-utterances.com"
},
{
"key": "Content-Security-Policy",
"value": "default-src 'self';base-uri 'self';form-action 'self' https://unicorn-utterances.com/ https://app.convertkit.com/;frame-ancestors 'none';frame-src https:;img-src 'self' https: data:;object-src 'none';script-src 'self' 'unsafe-inline' https://vercel.live/;connect-src 'self' https://vercel.live/;style-src 'self' 'unsafe-inline';upgrade-insecure-requests"
Expand All @@ -52,6 +56,10 @@
"key": "Cross-Origin-Resource-Policy",
"value": "same-origin"
},
{
"key": "Permissions-Policy",
"value": "camera=(), display-capture=(), document-domain=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), usb=(), clipboard-read=(), clipboard-write=(self)"
},
{
"key": "Referrer-Policy",
"value": "no-referrer"
Expand Down

0 comments on commit 5136317

Please sign in to comment.