#29606: Validate the type of ALLOWED_HOSTS
-------------------------------------+-------------------------------------
     Reporter:  rafis                |                    Owner:  Octavio
                                     |  Peri
         Type:  New feature          |                   Status:  assigned
    Component:  Core (System         |                  Version:  master
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:  allowed_hosts        |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Octavio Peri):

 Hi, I've assigned this ticket to myself and would like to check my idea
 with you before writing any code.

 I'm not sure about what Nick Mavrakis stated, maybe that'd be a good idea.

 But sticking to this ticket, I believe the best way to proceed is checking
 the setting is both iterable and not a str.
 I would do so in two places:
 1 - In `runserver`, where there's already one check related to
 ALLOWED_HOSTS
 2 - As a deployment check, that would raise an error if the constraints
 are not satisfied.

 If you could confirm this would be the way to go, I'd be more than happy
 to add them in a PR.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29606#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.c1edf2396895d5960d0319aeb575f062%40djangoproject.com.

Reply via email to