From 8c9ce365e4bd9c12146859dfb69fa415a237405f Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 1 Aug 2022 23:59:27 +0530 Subject: Script to run server locally --- runserver.sh | 2 ++ thatcomputerscientist/settings.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 runserver.sh diff --git a/runserver.sh b/runserver.sh new file mode 100755 index 00000000..464f6b6c --- /dev/null +++ b/runserver.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec sudo ./manage.py runserver localhost:80 \ No newline at end of file diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py index 9629797f..f7b02bf1 100644 --- a/thatcomputerscientist/settings.py +++ b/thatcomputerscientist/settings.py @@ -31,9 +31,9 @@ DEBUG = os.getenv('ENVIRONMENT') == 'development' or False # DEBUG = True ALLOWED_HOSTS = ["*"] -CSRF_TRUSTED_ORIGINS = ['https://*.thatcomputerscientist.com', 'https://*.thatcomputerscientist.fly.dev/'] -SESSION_COOKIE_DOMAIN = "127.0.0.1" if os.getenv('ENVIRONMENT') == 'development' else ".thatcomputerscientist.com" -DOMAIN_NAME = "127.0.0.1:8000" if os.getenv('ENVIRONMENT') == 'development' else "thatcomputerscientist.com" +CSRF_TRUSTED_ORIGINS = ['http://*.localhost', 'https://*.thatcomputerscientist.com', 'https://*.thatcomputerscientist.fly.dev/'] +SESSION_COOKIE_DOMAIN = "localhost" if os.getenv('ENVIRONMENT') == 'development' else ".thatcomputerscientist.com" +DOMAIN_NAME = "localhost" if os.getenv('ENVIRONMENT') == 'development' else "thatcomputerscientist.com" # Application definition -- cgit v1.2.3