Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print warning when server_name and cur_server_name don't match #760

Closed
Alexis-benoist opened this issue Aug 11, 2015 · 2 comments · Fixed by #1577
Closed

print warning when server_name and cur_server_name don't match #760

Alexis-benoist opened this issue Aug 11, 2015 · 2 comments · Fixed by #1577
Milestone

Comments

@Alexis-benoist
Copy link

Alexis-benoist commented Aug 11, 2015

If the server name is misconfigured, the subdomain is '<invalid>' and no warning is printed.

if cur_server_name[offset:] != real_server_name:

An improvement could be to print a warning if the names don't match, instead of just returning 404 errors for all pages.

@npdoty
Copy link

npdoty commented Nov 30, 2017

I just spent multiple days trying to debug a Flask application that returned 404s for every request with no indication as to why the routes weren't being matched. It would help troubleshooting enormously if there were a visible warning when this mismatch occurs.

@pallets pallets deleted a comment from guyskk Dec 1, 2018
@pallets pallets deleted a comment from jlark Dec 1, 2018
@davidism davidism changed the title Improvement: print warning when server_name and cur_server_name don't match print warning when server_name and cur_server_name don't match Dec 10, 2018
@WCICS
Copy link

WCICS commented May 31, 2019

I had the same issue. This should probably be an error, but there must atleast be a warning, as otherwise we have to dig through werkzeug source code just to find out that we have a config issue.

markroth8 added a commit to markroth8/werkzeug that referenced this issue May 31, 2019
@davidism davidism added this to the 1.0.0 milestone Jun 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants