Skip to content

Commit

Permalink
Merge pull request #40 from rcpch:eatyourpeas/issue39
Browse files Browse the repository at this point in the history
Eatyourpeas/issue39
  • Loading branch information
eatyourpeas authored Oct 19, 2024
2 parents a768844 + d24ac99 commit 73dc4b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rcpch_nhs_organisations/hospitals/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin

# Register your models here.
from .models import (
from .models_folder import (
LocalHealthBoard,
Organisation,
PaediatricDiabetesNetwork,
Expand All @@ -15,3 +15,8 @@
admin.site.register(PaediatricDiabetesUnit)
admin.site.register(PaediatricDiabetesNetwork)
admin.site.register(Trust)

admin.site.site_header = "RCPCH NHS Organisations"
admin.site.site_title = "RCPCH NHS Organisations admin"
admin.site.index_title = "RCPCH NHS Organisations"
admin.site.site_url = "/"
13 changes: 13 additions & 0 deletions rcpch_nhs_organisations/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@
"rcpch-nhs-organisations.localhost",
]

CSRF_TRUSTED_ORIGINS = os.getenv("DJANGO_CSRF_TRUSTED_ORIGINS", "").split(",") + [
"https://rcpch-nhs-organisations.localhost",
"https://127.0.0.1",
"https://localhost",
"https://0.0.0.0",
]

# Enables Django to use the X-Forwarded-Host header in preference to the Host header.
# Fixes CSRF errors when using Caddy to forward requests to Django.
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")


# Application definition

INSTALLED_APPS = [
Expand Down

0 comments on commit 73dc4b9

Please sign in to comment.