コード例 #1
0
ファイル: wsgiapp.py プロジェクト: rlugojr/grr
 def __init__(self):
     self.routing_map = werkzeug_routing.Map()
     self.routing_map.add(
         werkzeug_routing.Rule("/",
                               methods=["HEAD", "GET"],
                               endpoint=webauth.SecurityCheck(
                                   self._HandleHomepage)))
     self.routing_map.add(
         werkzeug_routing.Rule(
             "/api/<path:path>",
             methods=["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE"],
             endpoint=webauth.SecurityCheck(self._HandleApi)))
     self.routing_map.add(
         werkzeug_routing.Rule("/help/<path:path>",
                               methods=["HEAD", "GET"],
                               endpoint=webauth.SecurityCheck(
                                   self._HandleHelp)))
コード例 #2
0
ファイル: wsgiapp.py プロジェクト: tanner-g/grr
def EndpointWrapper(func):
    return webauth.SecurityCheck(LogAccessWrapper(func))