OK the code sample in my question is not a good example. My issue is that I can't use url_for in flask as the redirect url sent to the browser is an http redirect. I've simplified the logic of my application to only use render_template and those all work.
Interestingly
OK the code sample in my question is not a good example. My issue is that I can't use url_for in flask as the redirect url sent to the browser is an http redirect. I've simplified the logic of my application to only use render_template and those all work.
Interestingly
works (stays on the correct base url and port
but
in python does not.
I've seen proxy_fix and other techniques for teaching flask to modify it's url_for generator but I haven't explored those yet.
relative hrefs in