[Answer]-Django website 400 error from a client on Mac, Chrome/Firefox

1👍

The issue was how I put in the domain names into allowed_hosts:

ALLOWED_HOSTS = [
    'website.org',
    'website_2.org',
    ]

should have been

ALLOWED_HOSTS = [
    '.website.org',
    '.website.org',
    ]

the ‘.’ allowed the ‘www’ prefix to be used. Previously it was failing for those who typed www before the website address.

Leave a comment