Re: [Django] #12662: Enforce Hostname Middleware

2010-03-01 Thread Django
#12662: Enforce Hostname Middleware
+---
  Reporter:  robballou  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by robballou):

 I can understand the statements above, but there are two common issues (in
 my setups and probably for others):

 1. Most of the clients/web properties have "alternate" domains names for
 SEO and for other marketing. These often redirect back to the "primary"
 domain name. Also, part of making this middleware available is for the
 inverse of the {{{PREPEND_WWW}}} setting available (not all sites want
 their SEO/marketing to reflect a "www" domain).
 2. Many server/project setups do not allow easy web-server-level redirects
 at the host level in conjunction with Django projects. This may not be
 true for all setups, so it's demoted to a secondary concern!

 Needless to say, the code is available [http://gist.github.com/283860 and
 on GitHub] if anyone needs it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12662: Enforce Hostname Middleware

2010-02-10 Thread Django
#12662: Enforce Hostname Middleware
+---
  Reporter:  robballou  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => wontfix
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm not sure I agree that the use case is common enough to warrant
 inclusion in Django's core. Adding www is a common redirection
 requirement; routing "somedomain.com" to "otherdomain.com" isn't as
 common, and should probably be handled at the webserver level, anyway.

 On top of that, you allow the user to specify a list of allowed hostnames,
 but if the submitted domain isn't in that list, it gets arbitrarily
 redirected to the first specified host. It strikes me that if you're in a
 situation where this sort of thing is an issue, configurability of the
 routing rules will be important.

 In short - it strikes me as something that needs to be implemented on a
 per-site basis. The code isn't *that* complex, so this is probably better
 suited to a snippet than direct inclusion in core.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.