mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Use SECURE_SSL_REDIRECT to ensure requests are routed to https always
This commit is contained in:
@@ -45,9 +45,11 @@ if DEBUG or os.getenv("KHOJ_DOMAIN") == None:
|
|||||||
SESSION_COOKIE_DOMAIN = "localhost"
|
SESSION_COOKIE_DOMAIN = "localhost"
|
||||||
CSRF_COOKIE_DOMAIN = "localhost"
|
CSRF_COOKIE_DOMAIN = "localhost"
|
||||||
else:
|
else:
|
||||||
|
# Production Settings
|
||||||
SESSION_COOKIE_DOMAIN = KHOJ_DOMAIN
|
SESSION_COOKIE_DOMAIN = KHOJ_DOMAIN
|
||||||
CSRF_COOKIE_DOMAIN = KHOJ_DOMAIN
|
CSRF_COOKIE_DOMAIN = KHOJ_DOMAIN
|
||||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTOCOL", "https")
|
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTOCOL", "https")
|
||||||
|
SECURE_SSL_REDIRECT = True
|
||||||
|
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
CSRF_COOKIE_SECURE = True
|
CSRF_COOKIE_SECURE = True
|
||||||
|
|||||||
Reference in New Issue
Block a user