Hi folks,

I have the following setup: 
- one webserver serving the public avaiable domain (www.thisdomain.com)
- a subdomain is pointing to a app server (shop.thisdomain.com) running on a
different server

My routing:

shop_conditions = dict(sub_domain=["shop",])
map.connect('/:lang/:action', controller='shop', lang='en', action='index',
conditions=shop_conditions)

If I try to restrict the access to the controllers using the subdomain
approach it doesn't work. Using the same app on a "localhost:5000" server
approach works.

If I look at the sources I see:

        fullhost = config.environ.get('HTTP_HOST') or \
            config.environ.get('SERVER_NAME')

in _subdomain_check(config, kargs) in util.py. 

The relevant variable which would be applicable in my situation is
HTTP_X_FORWARDED_HOST.

Options:
- I made an mistake in the server/routes/... configuration I'm not aware of
- Extension of routes
-- by allowing a different subdomain_check routine (leave it to the pylons
app developer)
-- by allowing to configure the used host variable (either HTTP_HOST or
HTTP_X_FORWARDED_HOST)

My use case shouldn't be uncommon. Having an static HTML website which can't
be changed (e.g. intranet server), and having an "external" pylons app
serving under a subdomain.

Pointers? Ideas?

Andrew




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to