flask-sslify icon indicating copy to clipboard operation
flask-sslify copied to clipboard

Not functional

Open willgdjones opened this issue 7 years ago • 1 comments

Following instructions doesn't seem to redirect my traffic.

def app_factory():
    app = Flask(__name__)

    app.config.from_object('config')

    if app.config['ENV'] == 'prod': # only trigger SSLify if the app is running on Heroku
        sslify = SSLify(app)

After I push everything up:

(venv)➜  heterogeneous git:(master) curl -I http://www.heterogeneous.co.uk
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.6.0
Date: Sun, 06 Aug 2017 21:12:39 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 45089
Via: 1.1 vegur

Potential reasons:

  • Python 2

willgdjones avatar Aug 06 '17 21:08 willgdjones

When navigating to my site for the first time via HTTP, my server returns an HTTP response.

After I navigate to the site once via HTTPS, all future HTTP future is routed via HTTPS. Is this unexpected or expected behaviour? Thanks in advance.

willgdjones avatar Aug 07 '17 09:08 willgdjones