You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like this old issue said, routing behavior changed even when subdomain_matching defaults to false, so take this repository as example, if you comment following lines,
@app.before_request
def start():
"""
init globals and set the schema search path for the current request.
"""
g.user = session.get('user', None)
current_url = urlparse(request.url)
subdomain = current_url.hostname.split('.')
if subdomain.__len__() > 2:
"""
redirect to home page
"""
if current_url.path == "/":
return redirect(url_for('index'))
pass
pass
then requests to user1.flask-subdomain.com won't route to index, default 404 as response. Or am I missing something, as a result have misunderstood it. Thanks very much.
Just like this old issue said, routing behavior changed even when
subdomain_matching
defaults to false, so take this repository as example, if you comment following lines,then requests to
user1.flask-subdomain.com
won't route toindex
, default 404 as response. Or am I missing something, as a result have misunderstood it. Thanks very much.Environment
The text was updated successfully, but these errors were encountered: