DEV Community

tp1050
tp1050

Posted on

Enforcing HTTPs only on Flask

Flask tutorials are designed to be incomprehensible by type(object)=Human and StackOverFlow answers are rather unending tree search that each go down a confused time-space pocket.
So after hair pulling and near sucidial thoughts this all I had to do:

pip install flask-talisman

`from flask import Flask
from flask_talisman import Talisman

app = Flask(name)
Talisman(app)`

Do not read the example it will make you more confused.

However this is for production so do not bother trying to do network stuff with Flask at all.

Top comments (0)