Beispiel #1
0
 def setupPublisher(self):
     import ZPublisher.HTTPRequest
     from ZPublisher import WSGIPublisher
     WSGIPublisher.set_default_debug_mode(self.cfg.debug_mode)
     WSGIPublisher.set_default_authentication_realm(self.cfg.http_realm)
     if self.cfg.trusted_proxies:
         mapped = []
         for name in self.cfg.trusted_proxies:
             mapped.extend(_name_to_ips(name))
         ZPublisher.HTTPRequest.trusted_proxies = tuple(mapped)
Beispiel #2
0
 def setupPublisher(self):
     import ZPublisher.HTTPRequest
     from ZPublisher import WSGIPublisher
     WSGIPublisher.set_default_debug_mode(self.cfg.debug_mode)
     WSGIPublisher.set_default_authentication_realm(
         self.cfg.http_realm)
     if self.cfg.trusted_proxies:
         mapped = []
         for name in self.cfg.trusted_proxies:
             mapped.extend(_name_to_ips(name))
         ZPublisher.HTTPRequest.trusted_proxies = tuple(mapped)
Beispiel #3
0
 def _callFUT(self, host):
     from Zope2.Startup.handlers import _name_to_ips
     return _name_to_ips(host)