Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Flask SSL require and redirect helper decorator

Project description

Flask SSL require and redirect decorator

Easy to use package for Flask framework to check if request is served securely.

Please note, that this package does not enable SSL directly in Flask app (however we support that) we recommend you to use reverse proxy or wsgi server with configured SSL params.


pip install flask-ssl


You should have working reverse proxy server with configured SSL and SSL header information.

This plugin supports nginx and apache default configurations.

For example, for your nginx installation it will be:

server {

  location  / {

    proxy_set_header HTTPS on;
    proxy_set_header X-Forwarded-Ssl on;
    proxy_set_header X-Forwarded-Proto $scheme;


from flask_ssl import *

# {...}

def func():
    return "Ok, served via SSL"

def func2():
    return "Ok, served via SSL"


This project is licensed under the MIT License - see the LICENSE file for details.


This software is developed inside Standart AG, LLC, 2019

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flask-ssl, version
Filename, size File type Python version Upload date Hashes
Filename, size flask_ssl- (3.4 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page