From e568eca984978104256ce6dd9a9c9a0270ec25e3 Mon Sep 17 00:00:00 2001 From: frcroth Date: Thu, 19 Oct 2023 17:42:49 +0200 Subject: [PATCH] Add .well-known/security.txt (#412) --- myhpi/static/security.txt | 3 +++ myhpi/urls.py | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 myhpi/static/security.txt diff --git a/myhpi/static/security.txt b/myhpi/static/security.txt new file mode 100644 index 00000000..c03f60d8 --- /dev/null +++ b/myhpi/static/security.txt @@ -0,0 +1,3 @@ +Contact: https://github.com/fsr-de/myHPI/security/advisories/new +Expires: 2024-10-18T10:00:00.000Z +Preferred-Languages: en,de diff --git a/myhpi/urls.py b/myhpi/urls.py index 46b32f2c..2e4e5c3b 100644 --- a/myhpi/urls.py +++ b/myhpi/urls.py @@ -1,3 +1,5 @@ +import os + from django.conf import settings from django.conf.urls.i18n import i18n_patterns from django.contrib import admin @@ -25,6 +27,10 @@ ), path("select2/", include("django_select2.urls")), path("__debug__/", include("debug_toolbar.urls")), + path( + ".well-known/security.txt", + RedirectView.as_view(url=os.path.join(settings.STATIC_URL, "security.txt")), + ), ]