mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 20:49:41 +02:00
Fix linter errors
This commit is contained in:
parent
4ace5b4128
commit
e04a19b292
1 changed files with 30 additions and 39 deletions
|
@ -28,7 +28,7 @@ env = environs.Env()
|
|||
|
||||
# Get secrets from Cloud.gov user provided service, if exists
|
||||
# If not, get secrets from environment variables
|
||||
key_service = AppEnv().get_service(name='getgov-credentials')
|
||||
key_service = AppEnv().get_service(name="getgov-credentials")
|
||||
if key_service and key_service.credentials:
|
||||
secret = key_service.credentials.get
|
||||
else:
|
||||
|
@ -64,7 +64,6 @@ INSTALLED_APPS = [
|
|||
# from database models to provide a quick, model-centric
|
||||
# interface where trusted users can manage content
|
||||
"django.contrib.admin",
|
||||
|
||||
# vv Required by django.contrib.admin vv
|
||||
# the "user" model! *\o/*
|
||||
"django.contrib.auth",
|
||||
|
@ -75,7 +74,6 @@ INSTALLED_APPS = [
|
|||
# framework for displaying messages to the user
|
||||
"django.contrib.messages",
|
||||
# ^^ Required by django.contrib.admin ^^
|
||||
|
||||
# collects static files from each of your applications
|
||||
# (and any other places you specify) into a single location
|
||||
# that can easily be served in production
|
||||
|
@ -88,29 +86,21 @@ INSTALLED_APPS = [
|
|||
MIDDLEWARE = [
|
||||
# django-allow-cidr: enable use of CIDR IP ranges in ALLOWED_HOSTS
|
||||
"allow_cidr.middleware.AllowCIDRMiddleware",
|
||||
|
||||
# provide security enhancements to the request/response cycle
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
|
||||
# store and retrieve arbitrary data on a per-site-visitor basis
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
|
||||
# add a few conveniences for perfectionists, see documentation
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
|
||||
# add protection against Cross Site Request Forgeries by adding
|
||||
# hidden form fields to POST forms and checking requests for the correct value
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
|
||||
# add `user` (the currently-logged-in user) to incoming HttpRequest objects
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
|
||||
# provide framework for displaying messages to the user, see documentation
|
||||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
|
||||
# provide clickjacking protection via the X-Frame-Options header
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
|
||||
# django-csp: enable use of Content-Security-Policy header
|
||||
"csp.middleware.CSPMiddleware",
|
||||
]
|
||||
|
@ -221,7 +211,8 @@ SERVER_EMAIL = "root@get.gov"
|
|||
|
||||
# Content-Length header is set by django.middleware.common.CommonMiddleware
|
||||
|
||||
# X-Frame-Options header is set by django.middleware.clickjacking.XFrameOptionsMiddleware
|
||||
# X-Frame-Options header is set by
|
||||
# django.middleware.clickjacking.XFrameOptionsMiddleware
|
||||
# and configured in the Security and Privacy section of this file.
|
||||
# Strict-Transport-Security is set by django.middleware.security.SecurityMiddleware
|
||||
# and configured in the Security and Privacy section of this file.
|
||||
|
@ -349,7 +340,7 @@ LOGGING = {
|
|||
# endregion
|
||||
# region: Routing-----------------------------------------------------------###
|
||||
|
||||
## Set by django.middleware.common.CommonMiddleware
|
||||
# ~ Set by django.middleware.common.CommonMiddleware
|
||||
# APPEND_SLASH = True
|
||||
# PREPEND_WWW = False
|
||||
|
||||
|
@ -367,16 +358,16 @@ STATIC_URL = "public/"
|
|||
SECRET_KEY = secret_key
|
||||
|
||||
# Use this variable for doing SECRET_KEY rotation, see documentation
|
||||
SECRET_KEY_FALLBACKS = []
|
||||
SECRET_KEY_FALLBACKS: "list[str]" = []
|
||||
|
||||
## Set by django.middleware.security.SecurityMiddleware
|
||||
# ~ Set by django.middleware.security.SecurityMiddleware
|
||||
# SECURE_CONTENT_TYPE_NOSNIFF = True
|
||||
# SECURE_CROSS_ORIGIN_OPENER_POLICY = "same-origin"
|
||||
# SECURE_REDIRECT_EXEMPT = []
|
||||
# SECURE_REFERRER_POLICY = "same-origin"
|
||||
# SECURE_SSL_HOST = None
|
||||
|
||||
## Overridden from django.middleware.security.SecurityMiddleware
|
||||
# ~ Overridden from django.middleware.security.SecurityMiddleware
|
||||
# adds the includeSubDomains directive to the HTTP Strict Transport Security header
|
||||
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
|
||||
# adds the preload directive to the HTTP Strict Transport Security header
|
||||
|
@ -386,7 +377,7 @@ SECURE_HSTS_SECONDS = 300
|
|||
# redirect all non-HTTPS requests to HTTPS
|
||||
SECURE_SSL_REDIRECT = True
|
||||
|
||||
## Set by django.middleware.common.CommonMiddleware
|
||||
# ~ Set by django.middleware.common.CommonMiddleware
|
||||
# DISALLOWED_USER_AGENTS = []
|
||||
|
||||
# The host/domain names that Django can serve.
|
||||
|
@ -404,7 +395,7 @@ ALLOWED_HOSTS = [
|
|||
# load balancers for health checks, etc.
|
||||
ALLOWED_CIDR_NETS = ["10.0.0.0/8"]
|
||||
|
||||
## Below are some protections from cross-site request forgery.
|
||||
# ~ Below are some protections from cross-site request forgery.
|
||||
# This is canonically done by including a nonce value
|
||||
# in pages sent to the user, which the user is expected
|
||||
# to send back. The specifics of implementation are
|
||||
|
@ -466,7 +457,7 @@ SESSION_COOKIE_SAMESITE = "Strict"
|
|||
# instruct browser to only send cookie via HTTPS
|
||||
SESSION_COOKIE_SECURE = True
|
||||
|
||||
## Set by django.middleware.clickjacking.XFrameOptionsMiddleware
|
||||
# ~ Set by django.middleware.clickjacking.XFrameOptionsMiddleware
|
||||
# prevent clickjacking by instructing the browser not to load
|
||||
# our site within an iframe
|
||||
# X_FRAME_OPTIONS = "Deny"
|
||||
|
@ -477,7 +468,7 @@ SESSION_COOKIE_SECURE = True
|
|||
# Additional directories searched for fixture files.
|
||||
# The fixtures directory of each application is searched by default.
|
||||
# Must use unix style "/" path separators.
|
||||
FIXTURE_DIRS = []
|
||||
FIXTURE_DIRS: "list[str]" = []
|
||||
|
||||
# endregion
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue