Https To Http Using Cherrypy
Is it possible for CherryPy to redirect HTTP to HTTPS. Lets for example say the code below is http://example.com if someone visits via https://example.com I want them to be redirec
Solution 1:
You can check the request.scheme
if it is "https" then you can raise a redirect.
Solution 2:
Andrew Cox's link is broken again, here's the updated link to it. I don't have enough points to comment on his answer, hence the new answer.
https://cherrypy.readthedocs.org/en/3.3.0/refman/_cprequest.html#cherrypy._cprequest.Request.scheme
Post a Comment for "Https To Http Using Cherrypy"