def pre(self): BaseController.pre(self) action = request.environ["pylons.routes_dict"].get("action") if action: if not self._get_action_handler(): action = 'invalid' controller = request.environ["pylons.routes_dict"]["controller"] timer_name = "service_time.web.{}.{}".format(controller, action) c.request_timer = g.stats.get_timer(timer_name) else: c.request_timer = SimpleSillyStub() c.request_timer.start() if "Origin" in request.headers: oauth_origin = "https://%s" % g.oauth_domain response.headers["Access-Control-Allow-Origin"] = oauth_origin response.headers["Vary"] = "Origin" response.headers["Access-Control-Allow-Methods"] = "GET" response.headers["Access-Control-Allow-Credentials"] = "true"
def pre(self, *k, **kw): BaseController.pre(self, *k, **kw) c.extension = request.environ.get('extension')
def pre(self, *k, **kw): BaseController.pre(self, *k, **kw) c.extension = request.environ.get('extension')