How does flask know the right server name?


#1

I tried using flask.url_for(..., _external=True) and the output had the right project domain. How?

Supposedly it looks at SERVER_NAME, but that’s not set.


#2

oh, it probably gets it from the Host request header