Opened 5 years ago
Last modified 5 years ago
#31010 closed New feature
Add subdomains of localhost to ALLOWED_HOSTS in DEBUG mode — at Version 3
Reported by: | thenewguy | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
It would minimize configuration for new projects if ALLOWED_HOSTS += .localhost when DEBUG=True
Chrome resolves *.localhost to localhost without modifying any host files or DNS
Referencing the project this way makes it easy to test subdomains -> static.localhost, uploads.localhost, www.localhost, etc
---
Updated
---
Conversation on developer mailing list resulted in decision to reopen and accept ticket. The conversation turned up that this behavior is spec compliant per https://tools.ietf.org/html/rfc6761#section-6.3
Change History (3)
comment:1 by , 5 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 5 years ago
For reference, the conversation chain has been started: https://groups.google.com/forum/#!topic/django-developers/xcoAF9Gm_dI
comment:3 by , 5 years ago
Description: | modified (diff) |
---|---|
Easy pickings: | set |
Resolution: | needsinfo |
Status: | closed → new |
Triage Stage: | Unreviewed → Accepted |
Interesting. Currently we have, in
HttpRequest.get_host()
:Can I ask you to post to the DevelopersMailingList to canvas opinion? Assuming no blockers are raised it seems reasonable enough... (Reopen if accepted there.)