Beispiel #1
0
 def check(handler, *args, **kwargs):
     if not handler.request.secure:
         parts = handler.request.urlparts
         parts = UrlParts(('https',  # scheme
                           parts[1],  # netloc
                           parts[2],  # path
                           parts[3],  # query
                           None,  # fragment
                           ))
         return permanent_redirect(parts.geturl())
     return method(handler, *args, **kwargs)
Beispiel #2
0
 def post(self):
     return permanent_redirect(self.absolute_url_for(self.route_name, **self.route_args))