On zondag 1 juli 2018 19:10:15 CEST Tomasz Knapik wrote:

> Maybe you could restrict host headers at the nginx layer, but I don't
> think it's worth your effort... 

If you think of it like that it seems like a lot of work. But if you simply 
setup a default 
server that redirects to the actual Django server with correct hostname, then 
all you 
need is 2 server blocks: 1 default, 1 with correct `server_name`.

See Request Processing[1] for more background information and tricks.
-- 
Melvyn Sopacua

--------
[1] http://nginx.org/en/docs/http/request_processing.html

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1649516.A6oeUnqeAf%40fritzbook.
For more options, visit https://groups.google.com/d/optout.

Reply via email to