aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/settings/base.py7
-rw-r--r--config/settings/local.py12
-rw-r--r--config/settings/production.py3
3 files changed, 16 insertions, 6 deletions
diff --git a/config/settings/base.py b/config/settings/base.py
index 9c6183c..157926b 100644
--- a/config/settings/base.py
+++ b/config/settings/base.py
@@ -359,3 +359,10 @@ AWS_S3_ENDPOINT_URL = env("SPACES_ENDPOINT_URL")
MAILGUN_API_KEY = env("MAILGUN_API_KEY")
MAILGUN_SENDER_DOMAIN = env("MAILGUN_SENDER_DOMAIN")
MAILGUN_API_URL = env("MAILGUN_API_URL", default="https://api.eu.mailgun.net/v3")
+
+CACHES = {
+ "default": {
+ "BACKEND": "django.core.cache.backends.db.DatabaseCache",
+ "LOCATION": "rate_limit_cache",
+ },
+}
diff --git a/config/settings/local.py b/config/settings/local.py
index b9eb50b..e95cbb9 100644
--- a/config/settings/local.py
+++ b/config/settings/local.py
@@ -19,12 +19,12 @@ ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"] # noqa: S104
# CACHES
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
-CACHES = {
- "default": {
- "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
- "LOCATION": "",
- },
-}
+# CACHES = {
+# "default": {
+# "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
+# "LOCATION": "",
+# },
+# }
# EMAIL
# ------------------------------------------------------------------------------
diff --git a/config/settings/production.py b/config/settings/production.py
index cfd7d78..374be33 100644
--- a/config/settings/production.py
+++ b/config/settings/production.py
@@ -230,3 +230,6 @@ LOGGING = {
MAILGUN_API_KEY = env("MAILGUN_API_KEY")
MAILGUN_SENDER_DOMAIN = env("MAILGUN_DOMAIN")
MAILGUN_API_URL = env("MAILGUN_API_URL", default="https://api.eu.mailgun.net/v3")
+
+USE_X_FORWARDED_HOST = True
+SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")