prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Login is per-subdomain
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `website/website/settings/production.py`
  Content:
  ```
  1 """
  2 Django settings for the production environment of Project Moore.
  3 
  4 For more information regarding running in production see,
  5 See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
  6 
  7 For more information on this file, see
  8 https://docs.djangoproject.com/en/1.10/topics/settings/
  9 
  10 For the full list of settings and their values, see
  11 https://docs.djangoproject.com/en/1.10/ref/settings/
  12 """
  13 from __future__ import absolute_import, unicode_literals
  14 
  15 from .base import *
  16 
  17 # SECURITY WARNING: don't run with debug turned on in production!
  18 DEBUG = False
  19 
  20 # SECURITY WARNING: keep the secret key used in production secret!
  21 SECRET_KEY = os.environ.get(
  22     'DJANGO_SECRET',
  23     'za7^0@54n&p-dg4)_l12q_3^o5awz_uym0osqaz2!myki_8kw0'
  24 )
  25 
  26 # Database
  27 # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  28 
  29 DATABASES = {
  30     'default': {
  31         'ENGINE': 'django.db.backends.postgresql',
  32         'NAME': os.environ.get('DJANGO_DB'),
  33         'USER': os.environ.get('DJANGO_DB_USER'),
  34         'PASSWORD': os.environ.get('DJANGO_DB_PASS'),
  35         'HOST': os.environ.get('DJANGO_DB_HOST', '127.0.0.1'),
  36         'PORT':  os.environ.get('DJANGO_DB_PORT', '5432'),
  37     }
  38 }
  39 
  40 # CONN_MAX_AGE = 0
  41 
  42 # Base URL to use when referring to full URLs within the Wagtail admin
  43 # backend - e.g. in notification emails. Don't include '/admin' or a
  44 # trailing slash
  45 BASE_URL = 'https://dev.utn.se'
  46 
  47 ALLOWED_HOSTS = ['.utn.se']
  48 
  49 # Email settings
  50 DEFAULT_FROM_EMAIL = 'info@utn.se'
  51 
  52 EMAIL_SUBJECT_PREFIX = '[UTN] '
  53 
  54 # Admins - will be sent error messages
  55 ADMINS = [('UTN System Administrator', 'admin@utn.se')]
  56 
  57 LOGGING_CONFIG = None
  58 
  59 # TODO: HTTPS security
  60 # CSRF_COOKIE_SECURE = True
  61 #
  62 # SESSION_COOKIE_SECURE = True
  63 
  64 # Membership API
  65 MEMBERSHIP_API_USER = 'moore'
  66 MEMBERSHIP_API_PASSWORD = os.environ.get('MEMBERSHIP_API_PASSWORD')
  67 
  68 try:
  69     from .local import *
  70 except ImportError:
  71     pass
  72
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/website/website/settings/production.py b/website/website/settings/production.py
  --- a/website/website/settings/production.py
  +++ b/website/website/settings/production.py
  @@ -56,10 +56,11 @@
   
   LOGGING_CONFIG = None
   
  -# TODO: HTTPS security
  -# CSRF_COOKIE_SECURE = True
  -#
  -# SESSION_COOKIE_SECURE = True
  +CSRF_COOKIE_SECURE = True
  +
  +SESSION_COOKIE_DOMAIN = '.utn.se'
  +
  +SESSION_COOKIE_SECURE = True
   
   # Membership API
   MEMBERSHIP_API_USER = 'moore'
  
verification_info: {"golden_diff": "diff --git a/website/website/settings/production.py b/website/website/settings/production.py\n--- a/website/website/settings/production.py\n+++ b/website/website/settings/production.py\n@@ -56,10 +56,11 @@\n \n LOGGING_CONFIG = None\n \n-# TODO: HTTPS security\n-# CSRF_COOKIE_SECURE = True\n-#\n-# SESSION_COOKIE_SECURE = True\n+CSRF_COOKIE_SECURE = True\n+\n+SESSION_COOKIE_DOMAIN = '.utn.se'\n+\n+SESSION_COOKIE_SECURE = True\n \n # Membership API\n MEMBERSHIP_API_USER = 'moore'\n", "issue": "Login is per-subdomain\n\n", "before_files": [{"content": "\"\"\"\nDjango settings for the production environment of Project Moore.\n\nFor more information regarding running in production see,\nSee https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get(\n    'DJANGO_SECRET',\n    'za7^0@54n&p-dg4)_l12q_3^o5awz_uym0osqaz2!myki_8kw0'\n)\n\n# Database\n# https://docs.djangoproject.com/en/1.10/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': os.environ.get('DJANGO_DB'),\n        'USER': os.environ.get('DJANGO_DB_USER'),\n        'PASSWORD': os.environ.get('DJANGO_DB_PASS'),\n        'HOST': os.environ.get('DJANGO_DB_HOST', '127.0.0.1'),\n        'PORT':  os.environ.get('DJANGO_DB_PORT', '5432'),\n    }\n}\n\n# CONN_MAX_AGE = 0\n\n# Base URL to use when referring to full URLs within the Wagtail admin\n# backend - e.g. in notification emails. Don't include '/admin' or a\n# trailing slash\nBASE_URL = 'https://dev.utn.se'\n\nALLOWED_HOSTS = ['.utn.se']\n\n# Email settings\nDEFAULT_FROM_EMAIL = 'info@utn.se'\n\nEMAIL_SUBJECT_PREFIX = '[UTN] '\n\n# Admins - will be sent error messages\nADMINS = [('UTN System Administrator', 'admin@utn.se')]\n\nLOGGING_CONFIG = None\n\n# TODO: HTTPS security\n# CSRF_COOKIE_SECURE = True\n#\n# SESSION_COOKIE_SECURE = True\n\n# Membership API\nMEMBERSHIP_API_USER = 'moore'\nMEMBERSHIP_API_PASSWORD = os.environ.get('MEMBERSHIP_API_PASSWORD')\n\ntry:\n    from .local import *\nexcept ImportError:\n    pass\n", "path": "website/website/settings/production.py"}], "after_files": [{"content": "\"\"\"\nDjango settings for the production environment of Project Moore.\n\nFor more information regarding running in production see,\nSee https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = False\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get(\n    'DJANGO_SECRET',\n    'za7^0@54n&p-dg4)_l12q_3^o5awz_uym0osqaz2!myki_8kw0'\n)\n\n# Database\n# https://docs.djangoproject.com/en/1.10/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': os.environ.get('DJANGO_DB'),\n        'USER': os.environ.get('DJANGO_DB_USER'),\n        'PASSWORD': os.environ.get('DJANGO_DB_PASS'),\n        'HOST': os.environ.get('DJANGO_DB_HOST', '127.0.0.1'),\n        'PORT':  os.environ.get('DJANGO_DB_PORT', '5432'),\n    }\n}\n\n# CONN_MAX_AGE = 0\n\n# Base URL to use when referring to full URLs within the Wagtail admin\n# backend - e.g. in notification emails. Don't include '/admin' or a\n# trailing slash\nBASE_URL = 'https://dev.utn.se'\n\nALLOWED_HOSTS = ['.utn.se']\n\n# Email settings\nDEFAULT_FROM_EMAIL = 'info@utn.se'\n\nEMAIL_SUBJECT_PREFIX = '[UTN] '\n\n# Admins - will be sent error messages\nADMINS = [('UTN System Administrator', 'admin@utn.se')]\n\nLOGGING_CONFIG = None\n\nCSRF_COOKIE_SECURE = True\n\nSESSION_COOKIE_DOMAIN = '.utn.se'\n\nSESSION_COOKIE_SECURE = True\n\n# Membership API\nMEMBERSHIP_API_USER = 'moore'\nMEMBERSHIP_API_PASSWORD = os.environ.get('MEMBERSHIP_API_PASSWORD')\n\ntry:\n    from .local import *\nexcept ImportError:\n    pass\n", "path": "website/website/settings/production.py"}]}