title: CSRF verification failed behind Route 53
body: <p>I have a dockerized Django app that utilizes Gunicorn and Nginx.  When logging in on the admin page using localhost, no CSRF error emerges.  When running the docker on Amazon EC2 with Route 53 as the proxy server (https redirects to http), I get the CSRF error on login.  I note the following in my settings.py file (I added the SECURE_SSL_REDIRECT = False but it has had no effect):</p>
  <pre><code>ALLOWED_HOSTS = ['localhost', '.website_name.ca']
  
  SECURE_SSL_REDIRECT = False
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'The6ixDjango.apps.The6IxdjangoConfig',
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  </code></pre>
  <p>Given that I have Route 53 on the front-end, is it 'safe' to remove the csrf middleware reference in the MIDDLEWARE list?</p>