I have a client server application. I managed to make them connect over https using SSl encryption using this
context = SSL.Context(SSL.SSLv3_METHOD)
con
My I suggest trying out Flask-SSLify - https://github.com/kennethreitz/flask-sslify
Usage is pretty simple:
from flask import Flask
from flask_sslify import SSLify
app = Flask(__name__)
sslify = SSLify(app)
If you make an HTTP request, it will automatically redirect:
$ curl -I http://secure-samurai.herokuapp.com/
HTTP/1.1 302 FOUND
Content-length: 281
Content-Type: text/html; charset=utf-8
Date: Sun, 29 Apr 2012 21:39:36 GMT
Location: https://secure-samurai.herokuapp.com/
Server: gunicorn/0.14.2
Strict-Transport-Security: max-age=31536000
Connection: keep-alive
Installation is simple too:
$ pip install Flask-SSLify