I use django as a backend, and it works on 8000 ports in the loopback interface. Therefore, when I try to start it using DEBUG = False, I received 500 errors on any request from the external interface. I set my ALLOWED_HOSTS as:
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '127.0.0.1:8000', 'localhost:8000', '*',]
But this does not work for me. Is it possible to disable this option or how can I do this?
UPDATE So I just declared the variable ALLOWED_HOSTS above the default value ALLOWED_HOSTS = []. Sorry for the carelessness.
source share