예제 #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)
예제 #2
0
파일: starter.py 프로젝트: dhavlik/Zope
 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)
예제 #3
0
 def _callFUT(self, host):
     from Zope2.Startup.handlers import _name_to_ips
     return _name_to_ips(host)