To give you an idea of my set up I am using an AWS EC2 instance behind an application load balancer. This EC2 instance is running Windows IIS which is configured to run a reverse proxy that redirects all traffic with pattern: "(.*)" to "http://localhost:5000/{R:1}" (Which I think may be part of the problem). From here Waitress takes over and I have a backend with python Flask.
I am trying to create an email verification system. The problem is the link that's sent to the user is with "locahost:5000" and not my domain name.
Whenever I try to manually change the Server name through:
app.config['SERVER_NAME'] = '{insert Website Name}'
I get:
C:\Python311\Lib\site-packages\flask\app.py:425: UserWarning: Current server name 'localhost:5000' doesn't match configured server name '{insert Website Name}'
return self.url_map.bind_to_environ(
The line that uses url_for looks like this:
verification_url = url_for('verify_email.verify_email_token', token=token, _external=True)
If you need any more info to diagnose the problem let me know.