Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues #122

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,26 @@ const builddate = process.env.BUILD_DATE
: 'DATE-NA'

const securityHeaders = [
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
key: 'Content-Security-Policy',
value:
"default-src 'self'; base-uri 'self'; frame-ancestors 'self'; form-action 'self'; object-src 'none'; script-src-elem 'self'; script-src 'self' 'unsafe-eval'; connect-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:",
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
{
key: 'X-XSS-Protection',
value: '0',
value: 'camera=(); battery=(); geolocation=(); microphone=()',
},
{
key: 'Content-Security-Policy',
value:
"default-src 'self'; base-uri 'self'; frame-ancestors 'self'; form-action 'self'; object-src 'none'; script-src-elem 'self'; script-src 'self' 'unsafe-eval'; connect-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:",
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
]

Expand All @@ -56,7 +44,7 @@ module.exports = {
async headers() {
return [
{
source: '/:path*',
source: '/(.*)',
headers: securityHeaders,
},
]
Expand Down
47 changes: 4 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
"next-seo": "^6.1.0",
"pino": "^8.14.1",
"prom-client": "^14.2.0",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^13.0.2"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
Expand Down
6 changes: 6 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export default function Document({ locale }: DocumentProps) {
<Head>
<meta charSet="utf-8" />
<link rel="icon" href="/assets/favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"
rel="stylesheet"
/>
</Head>
<body>
<Main />
Expand Down
9 changes: 3 additions & 6 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Image from 'next/image'
import Link from 'next/link'
import React from 'react'
import { NextPage } from 'next'
Expand All @@ -15,13 +14,11 @@ export default function Index() {
<div className="flex flex-col justify-center items-center m-auto">
<div className="z-10 bg-white h-auto w-[18.75rem] xl:w-[31.25rem]">
<h1 className="sr-only">service.canada.ca-digital-center</h1>

<div className="h-auto w-64 mx-auto pt-6 xl:w-2/3 xl:mx-0 xl:px-6">
<Image
<div className="p-2">
<img
src="/assets/sig-blk-en.svg"
alt="Government of Canada / Gouvernement du Canada logo"
width={200}
height={100}
className="w-3/4"
/>
</div>
<div className="flex w-max container py-11 mx-auto font-display">
Expand Down
4 changes: 0 additions & 4 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* ensure that there is a semicolon at the end of the line otherwise the styles will not build correctly in production. */
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Noto+Sans:wght@400;700&display=swap&family=Patua+One:wght@100;400;700&display=swap");


/* tailwind default */
@tailwind base;
@tailwind components;
Expand Down
12 changes: 0 additions & 12 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@ module.exports = {
],
theme: {
extend: {
fontFamily: {
display: ['Lato', 'sans-serif'],
body: ['Noto sans', 'sans-serif'],
extra: ['Patua One', 'cursive'],
},
colors: {
current: 'currentColor',
},
backgroundImage: () => ({
'footer-parliament-image': 'url(../../public/assets/landscape.png)',
}),
boxShadow: {
card: '0px 2px 8px rgba(0, 0, 0, 0.25)',
},
},
},
plugins: [require('@tailwindcss/typography')],
}
Loading