Skip to content

Commit

Permalink
ajustes csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
michelebswm committed Oct 10, 2023
1 parent d0fa95e commit f4b3155
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions hashflix/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-%^9!uvtl3#@2kx0p_t-j2_*lwv-l%pj%vcbrew_cy30xv3&rzi'
TOKEN_CSRF = os.getenv("TOKEN_CSRF")
if TOKEN_CSRF:
SECRET_KEY = TOKEN_CSRF
CSRF_TRUSTED_ORIGINS = ['https://sitecomdjango-production.up.railway.app/']
else:
SECRET_KEY = 'django-insecure-%^9!uvtl3#@2kx0p_t-j2_*lwv-l%pj%vcbrew_cy30xv3&rzi'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']
ALLOWED_HOSTS = [
"https://sitecomdjango-production.up.railway.app/", "localhost", "127.0.0.1"]


# Application definition
Expand Down

0 comments on commit f4b3155

Please sign in to comment.