+ It get's prerendered per request and has access to request and
+ response data
+
+
+ That's why it can use Nonce-based CSP, it has the chance to set a
+ fresh nonce as attribute to scripts on each request.
+
+
Inline Styles
+
+ Hi, i am styled with by an inline style tag. If I am teal, I am
+ trusted by CSP
+
+
+ Hi, i am styled with by an inline style attribute, If I am blue
+ , I am trusted by CSP
+
+
+
+
+ );
+};
+
+export default Page;
diff --git a/apps/e2e/pages/gssp/index.tsx b/apps/e2e/pages/gssp/index.tsx
index 2e3f009..5a8837d 100644
--- a/apps/e2e/pages/gssp/index.tsx
+++ b/apps/e2e/pages/gssp/index.tsx
@@ -5,6 +5,7 @@ import Hydrated from "components/Hydrated";
import StyleElem from "components/StyleElem";
import StyleAttr from "components/StyleAttr";
import { gsspWithNonce } from "@next-safe/middleware/dist/document";
+import TestNavigation from "../../components/TestNavigation";
export const getServerSideProps = gsspWithNonce(async (ctx) => {
return {
@@ -35,19 +36,7 @@ const Page = () => {
Hi, i am styled with by an inline style attribute, If I am blue
, I am trusted by CSP
-
+
);
diff --git a/apps/e2e/pages/index.tsx b/apps/e2e/pages/index.tsx
index 12d9ce9..d1c0f93 100644
--- a/apps/e2e/pages/index.tsx
+++ b/apps/e2e/pages/index.tsx
@@ -1,6 +1,7 @@
-import Prose from "components/Prose";
-import Container from "components/Container";
-import Hydrated from "components/Hydrated";
+import Prose from 'components/Prose';
+import Container from 'components/Container';
+import Hydrated from 'components/Hydrated';
+import InternalTestLinks from '../components/InternalTestLinks';
// pages without a data fetching function are static pages and must use a Hash-based CSP.
const Page = () => {
@@ -18,20 +19,7 @@ const Page = () => {
diff --git a/apps/e2e/pages/isr/[slug].tsx b/apps/e2e/pages/isr/[slug].tsx
index c6f29b4..97ae1f7 100644
--- a/apps/e2e/pages/isr/[slug].tsx
+++ b/apps/e2e/pages/isr/[slug].tsx
@@ -1,9 +1,9 @@
-import Link from "next/link";
-import Prose from "components/Prose";
-import Layout from "components/Layout";
-import Hydrated from "components/Hydrated";
-import StyleElem from "components/StyleElem";
-import StyleAttr from "components/StyleAttr";
+import Prose from 'components/Prose';
+import Layout from 'components/Layout';
+import Hydrated from 'components/Hydrated';
+import StyleElem from 'components/StyleElem';
+import StyleAttr from 'components/StyleAttr';
+import TestNavigation from '../../components/TestNavigation';
export const getStaticPaths = async () => {
// as long as we build-time prerender at least one path, it will work with Hash-based strict CSP.
@@ -63,15 +63,7 @@ const Page = ({ random, revalidate }) => {
Hi, i am styled with by an inline style attribute, If I am{" "}
fuchsia, I am trusted by CSP
-