Request handler decorators

decorators.https_only(method)

Decorate request handler’s method with this decorator to ensure request will be served only via HTTPS.

Because decorator is using self.request.protocol variable make sure xheaders is set to True:

tornado.httpserver.HTTPServer(tornado.web.Application(urls, **settings), xheaders=True)

Previous topic

Request handlers

Next topic

Server-side session support

This Page