-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production deployment fix #426
base: main
Are you sure you want to change the base?
Conversation
@@ -24,9 +24,10 @@ def check_hash(api_token, encrypted_api_token) -> bool: | |||
""" | |||
Checks if the API token matches the encrypted API token. | |||
""" | |||
print(api_token, encrypted_api_token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit;
@@ -29,7 +29,8 @@ | |||
# SECURITY WARNING: don't run with debug turned on in production! | |||
DEBUG = False | |||
|
|||
ALLOWED_HOSTS = list(os.environ.get("DJANGO_ALLOWED_HOSTS", "").split(" ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should remove ALLOWED_HOSTS!
@@ -29,7 +29,8 @@ | |||
# SECURITY WARNING: don't run with debug turned on in production! | |||
DEBUG = False | |||
|
|||
ALLOWED_HOSTS = list(os.environ.get("DJANGO_ALLOWED_HOSTS", "").split(" ")) | |||
CORS_ALLOW_HEADERS = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow all headers could potentially cause security issues in prod. Please specify exactly the headers you need.
@@ -4,7 +4,7 @@ | |||
from pathlib import Path | |||
import dotenv | |||
|
|||
env_file = next((Path(__file__).parent.parent / "env").glob("*.env")) | |||
env_file = next((Path(__file__).parent.parent / "env").glob(".env*")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this cause issues if there are multiple env files present in the folder? It seems like it will randomly choose 1.
No description provided.