Skip to content

Instantly share code, notes, and snippets.

@linnil1
Created May 10, 2020 06:07
Show Gist options
  • Save linnil1/9577deeb5a7118db11130930c5f8d6b7 to your computer and use it in GitHub Desktop.
Save linnil1/9577deeb5a7118db11130930c5f8d6b7 to your computer and use it in GitHub Desktop.
Very Simple flask app example under reverse proxy
from flask import Flask, Blueprint
from werkzeug.middleware.proxy_fix import ProxyFix
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
bp = Blueprint("main", __name__)
@bp.route("/")
def ping():
return "hi"
app.register_blueprint(bp, url_prefix="/linnil1")
if __name__ == "__main__":
app.run(host="0.0.0.0",
port=5000)
@toddrob99
Copy link

This helped me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment