Created
May 10, 2020 06:07
-
-
Save linnil1/9577deeb5a7118db11130930c5f8d6b7 to your computer and use it in GitHub Desktop.
Very Simple flask app example under reverse proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helped me. Thank you.