Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
fix: csp config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Mar 18, 2022
1 parent 3d1959c commit e3dc26e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
4 changes: 3 additions & 1 deletion next-seo.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ContentSecurityPolicy from "./csp.config";

export default {
const DEFAULT_SEO_CONFIG = {
additionalLinkTags: [
{
rel: "icon",
Expand All @@ -14,3 +14,5 @@ export default {
},
],
};

export default DEFAULT_SEO_CONFIG;
1 change: 0 additions & 1 deletion src/components/landing/tile.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import { Testimonial } from "./testimonial";
import { Tile } from "./tile";

export default {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "@gouvfr/dsfr/dist/dsfr/dsfr.min.css";
import "../../next-seo.config";
import type { AppProps } from "next/app";
import SEO from "../../next-seo.config";
import { Layout } from "@components";
import {
footerBodySection,
Expand All @@ -11,6 +11,7 @@ import {
} from "@config";
import { useEffect } from "react";
import { init } from "@socialgouv/matomo-next";
import { DefaultSeo } from "next-seo";

function MyApp({ Component, pageProps }: AppProps) {
useEffect(() => {
Expand All @@ -30,6 +31,7 @@ function MyApp({ Component, pageProps }: AppProps) {
topSection: footerTopSection,
}}
>
<DefaultSeo {...(SEO as any)} />
<Component {...pageProps} />
</Layout>
);
Expand Down
6 changes: 3 additions & 3 deletions src/pages/cgu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { MentionPart } from "@components";
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";
import React from "react";

const Cgu: NextPage = () => {
return (
<>
<DefaultSeo
<NextSeo
title="Template | Conditions générales d'utilisation"
description="Conditions générales d'utilisation de l'application template."
additionalLinkTags={[
Expand All @@ -22,7 +22,7 @@ const Cgu: NextPage = () => {
},
{
name: "application-name",
content: "DefaultSeo",
content: "NextSeo",
},
{
httpEquiv: "x-ua-compatible",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/healthz.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";
import React from "react";

const HealthZ: NextPage = () => {
return (
<>
<DefaultSeo
<NextSeo
title="Template | HealthZ"
description="Page healthZ de l'application Template."
additionalLinkTags={[
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Head, Testimonial, Tile } from "@components";
import { Row } from "@dataesr/react-dsfr";
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";

const Index: NextPage = () => {
return (
<>
<DefaultSeo
<NextSeo
title="Template"
description="Template de la fabrique des ministères sociaux."
additionalLinkTags={[
Expand Down
4 changes: 2 additions & 2 deletions src/pages/mention-legales.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { MentionPart } from "@components";
import { Title } from "@dataesr/react-dsfr";
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";
import React from "react";

const LegalMention: NextPage = () => {
return (
<>
<DefaultSeo
<NextSeo
title="Template | Mention légales"
description="Mentions légales de l'application template."
additionalLinkTags={[
Expand Down
4 changes: 2 additions & 2 deletions src/pages/politique-confidentialite.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Table } from "@dataesr/react-dsfr";
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";
import React from "react";

const URL = [
Expand All @@ -13,7 +13,7 @@ const URL = [
const Confidentiality: NextPage = () => {
return (
<>
<DefaultSeo
<NextSeo
title="Template | Politique de confidentialité"
description="Politique de confidentialité de l'application template."
additionalLinkTags={[
Expand Down
4 changes: 2 additions & 2 deletions src/pages/stats.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StatsTile } from "@components";
import { fetchMatomoData, MatomoResult } from "@lib";
import type { NextPage } from "next";
import { DefaultSeo } from "next-seo";
import { NextSeo } from "next-seo";
import React, { useEffect } from "react";

const Stats: NextPage = () => {
Expand All @@ -19,7 +19,7 @@ const Stats: NextPage = () => {
}, []);
return (
<>
<DefaultSeo
<NextSeo
title="Template | Statistiques d'utilisation"
description="Statistiques d'utilisation de l'application template."
additionalLinkTags={[
Expand Down

0 comments on commit e3dc26e

Please sign in to comment.