OH-SHOWN / ohshown-backend

OH!SHOWN 野生動物出沒痕跡通報系統
http://ohshown.site
MIT License
2 stars 8 forks source link

development site of backend is down - DisallowedHost at /admin #63

Closed tai271828 closed 2 years ago

tai271828 commented 2 years ago

Click http://ohshown.site:8888/admin and django will complain.

DisallowedHost at /admin
Invalid HTTP_HOST header: 'ohshown.site:8888'. You may need to add 'ohshown.site' to ALLOWED_HOSTS.
tai271828 commented 2 years ago

The root cause is that "for reasons" the variable allowed_hosts" in./gis_project/settings.py` introduces unnecessary double quotes. For example,

web_1 | ['"ohshown.site', 'localhost', '127.0.0.1', '207.154.228.24"']

Next step: I will try to figure out where the double quote comes from.

tai271828 commented 2 years ago

We should not use double quotes in OHSHOWN_ALLOWED_HOST of .env.