1

I'm implementing a django multi-site portal. I'm probing it and I get an "Invalid HTTP_HOST header" exception when I try to access a site domain that I have register in Sites model. Is it necessary to set the url in settings.ALLOWED_HOSTS too?

1 Answer 1

1

Yes, according to documentation:

A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations.

Link for more info: https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.