From 8f1741441b04e80af07e53157a3009f3b7626010 Mon Sep 17 00:00:00 2001 From: dominikgeissler <39053640+dominikgeissler@users.noreply.github.com> Date: Sun, 3 Mar 2024 10:50:04 +0100 Subject: [PATCH] Added security.txt, .gitattributes and PR template (#129) * added security.txt, gitattributes * Added PR template * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .gitattributes | 4 ++++ .github/PULL_REQUEST_TEMPLATE.md | 18 ++++++++++++++++++ src/routes/[...slug]/+page.server.ts | 4 ---- static/security.txt | 3 +++ tsconfig.json | 4 ++-- 5 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 static/security.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..abebe48a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto + +*.png binary +*.jpg binary diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..19411eaf --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,18 @@ +## Description + + + +## Changelog + + + + +#### Added + +#### Changed + +#### Removed + +## Additional information + + diff --git a/src/routes/[...slug]/+page.server.ts b/src/routes/[...slug]/+page.server.ts index 8e619a8e..273efd1d 100644 --- a/src/routes/[...slug]/+page.server.ts +++ b/src/routes/[...slug]/+page.server.ts @@ -2,10 +2,6 @@ import { fetch_page } from '$lib/fetch' import { error } from '@sveltejs/kit' export const load = async ({ params }) => { - // delegate route to static/robots.txt - // is this check necessary, will prob fallthrough anyway - if (params.slug === `robots.txt`) throw error(404) - const page = await fetch_page(params.slug) // If no page data could be fetched for params.slug, the page doesn't exist, diff --git a/static/security.txt b/static/security.txt new file mode 100644 index 00000000..1d9f822e --- /dev/null +++ b/static/security.txt @@ -0,0 +1,3 @@ +Contact: mailto:it@studytutors.de +Expires: 2030-01-01T11:00:00.000Z +Preferred-Languages: en,de diff --git a/tsconfig.json b/tsconfig.json index 53564ec1..bb4a558c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,6 @@ "sourceMap": true, "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - }, + "resolveJsonModule": true + } }