Hi Tomasz,
On 2018-07-01 19:10, Tomasz Knapik wrote:
I don't think that's wise to set allowed hosts to a host you don't want
your application to be accessed by.
I agree completely, which is why I asked the question. Thanks a lot.
Django documentation shows you how
you can mute the errors -
https://docs.djangoproject.com/en/2.0/topics/logging/#django-security.
It's not technically an error of your application.
That's very helpful. Again thanks a lot. I mostly wanted to know what
was the right way to handle this and I think just ignoring errors like
this is probably the best way in my use case.
Maybe you could restrict host headers at the nginx layer, but I don't
think it's worth your effort... Maybe you should use some smarter
solution for receiving errors like Sentry where you only get notified
once about an error and you can mute them instead of relying on each
error occurrence triggering an email :P
Also you could integrate more into AWS and use their load balancing
service where you should be able to set routing based on host header.
I think all of that is probably very much overkill considering that this
is just a private homepage that at most has a couple of visitors a day,
but thanks for the pointers.
Very much appreciated.
Kind regards,
Kasper Laudrup
--
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/b8ff242d-e41f-7e69-a9d3-6e66c5d4e95b%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.