Last active
February 22, 2021 09:05
-
-
Save carc1n0gen/edbd536a6e5394ca04dd7c88158f5824 to your computer and use it in GitHub Desktop.
Flask Host Matching
This file contains hidden or 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, url_for | |
app = Flask(__name__, host_matching=True, static_host='app1.local:5000') | |
@app.route('/', host='app1.local:5000') | |
def home1(): | |
return url_for('home1') | |
@app.route('/', host='app2.local:5000') | |
def home2(): | |
return url_for('home2') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment