Skip to content

Commit

Permalink
fix CSP
Browse files Browse the repository at this point in the history
  • Loading branch information
djay committed Nov 21, 2024
1 parent 7ffd694 commit a9e4bd7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/nuxt-blog-starter/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default defineNuxtConfig({
security: {
headers: { // Edit site can be put in an iframe
contentSecurityPolicy: {
'img-src': ['self', 'data:', 'https://hydra.pretagov.com', 'https://hydra-api.pretagov.com'],
'connect-src': ["'self'", 'data:', 'https://hydra.pretagov.com', 'https://hydra-api.pretagov.com'],
'img-src': ["'self'", "data:", 'https://hydra.pretagov.com', 'https://hydra-api.pretagov.com'],
'connect-src': ["'self'", "data:", 'https://hydra.pretagov.com', 'https://hydra-api.pretagov.com'],
'frame-ancestors': ['*']
},
crossOriginResourcePolicy: "cross-origin",
Expand Down
14 changes: 12 additions & 2 deletions examples/nuxt-blog-starter/pages/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<template>
<Header :data="data"></Header>
<main class="pt-8 pb-16 lg:pt-16 lg:pb-24 bg-white dark:bg-gray-900 antialiased">
<html>
<head v-if="data?.page">
<title>{{ data.page?.title }} : Hydra</title>
<meta name="description" :content="data.page?.description">
</head>
<body>
<Header :data="data"></Header>
<main class="pt-8 pb-16 lg:pt-16 lg:pb-24 bg-white dark:bg-gray-900 antialiased">
<div class="flex justify-between px-4 mx-auto max-w-screen-xl ">
<article class="mx-auto w-full max-w-2xl format format-sm sm:format-base lg:format-lg format-blue dark:format-invert">
<!-- <h1 class="text-center" data-editable-metadata="title">{{data?.title}}</h1> -->
Expand Down Expand Up @@ -38,6 +45,9 @@
</ul>
</div>
</footer>
</body>
</html>

</template>


Expand Down

0 comments on commit a9e4bd7

Please sign in to comment.