FireJet schrieb: > Hi, all. > > I'm new to TurboGears, and I've been developing an app, but I've come > across a problem. I have the need to be able to access the domain name > (http://www.example.com) of the current host in my controller, but I > can't seem to find the variable to access this anywhere in the > documentation.
Try cherrypy.request.headers['Host']. That's the domain name, the remote client requested (watch out if your TG app is running behind a reverse proxy though). See http://www.cherrypy.org/chrome/common/2.2/docs/book/chunk/ch03s03.html#id3509490 for more info. Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

