Skip to content

Commit

Permalink
Fix #3 Try to fix settings_production
Browse files Browse the repository at this point in the history
  • Loading branch information
stariluz committed Jun 24, 2024
1 parent 49f6688 commit 5dccc84
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Server media
media/*

# Secret vars
./environment/.env.production

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
12 changes: 6 additions & 6 deletions environment/.env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SECRET_KEY=$SECRET_KEY
AWS_ACCOUNT_ID=$AWS_ACCOUNT_ID
AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
AWS_STORAGE_BUCKET_NAME=$AWS_STORAGE_BUCKET_NAME
PROD_HOST=$PROD_HOST
SECRET_KEY=Choosing-Patronize-Thwarting-Starboard1
AWS_ACCOUNT_ID=5868f1c65dbb2a8c20cd09e90d5d3c29
AWS_ACCESS_KEY_ID=9f26f095ffc522c4b925147501c806c3
AWS_SECRET_ACCESS_KEY=779e95afec301c6eb6935475bef78e4c141192fe68558be170341c473b41e597
AWS_STORAGE_BUCKET_NAME=my-facegram-storage
PROD_HOST=https://myfacegram-bohfye0n.b4a.run/, https://node85a.containers.back4app.com
5 changes: 3 additions & 2 deletions myFacegram/settings_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
ALLOWED_HOSTS = [
'127.0.0.1',
'localhost'
]+os.environ["PROD_HOST"].split(",");

]+os.environ["PROD_HOST"].split(",")
print(ALLOWED_HOSTS)

# Application definition

Expand Down Expand Up @@ -148,6 +148,7 @@

LOGIN_URL = '/users/login/'

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
CSRF_COOKIE_SECURE=True
SRF_COOKIE_SECURE=True

Expand Down

0 comments on commit 5dccc84

Please sign in to comment.