from flask import Flask, render_template, redirect, url_for
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/login')
def login():
return redirect('http://localhost:5002/login')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5001)
I am running 2 container applications on same host using azure container group, after successful deployment I am able to access the application using http://public-ip:5001, but when I click on login link it redirect me to http://localhost:5002/login. but the problem is localhost is pointing to my local machine, but I want it to redirect to localhost:5003 on server. so that I am redirected to sidecar container.
New contributor
Shashidher Reddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.