https://example.com/admin redirects to https://adm

2019-07-19 05:39发布

The entire application works with Django + Nginx + Gunicorn using SSL(in production). But when I try to access django-admin page by https://example.com/admin and try to login it redirects me to (https://admin).

PS: Sorry for a silly question. Any inputs ?

1条回答
疯言疯语
2楼-- · 2019-07-19 06:37

This sounds very similar to Django's HttpResponseRedirect seems to strip off my subdomain.

And if so, the likely issue is that either your nginx proxy or Gunicorn is not delivering the domain name (HTTP_HOST) to Django. Verify by examining request.META within Django.

查看更多
登录 后发表回答