aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-08-01 23:59:27 +0530
committerBobby <[email protected]>2022-08-01 23:59:27 +0530
commit8c9ce365e4bd9c12146859dfb69fa415a237405f (patch)
tree7ca97745b8717c158de0a6291a753927831c76a6
parent4187d41c5910264a77d2af33a66ef012d0e90c3e (diff)
downloadthatcomputerscientist-8c9ce365e4bd9c12146859dfb69fa415a237405f.tar.xz
thatcomputerscientist-8c9ce365e4bd9c12146859dfb69fa415a237405f.zip
Script to run server locally
-rwxr-xr-xrunserver.sh2
-rw-r--r--thatcomputerscientist/settings.py6
2 files changed, 5 insertions, 3 deletions
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