title: Getting the absolute url from flask url_for
body: <p>this is my current scenario.
  i have docker that runs nginx to reverse proxy the request calls to the backend rest api's(implemented using flask module).
  and from my docker host machine i mapped 8080 to port 80 of docker, As nginx is running on port 80 of docker.</p>
  
  <p>this is a snippet in nginx.conf which is a call to login api</p>
  
  <pre><code> location /login {
          proxy_pass http://localhost:8080;
          proxy_set_header Host $host;
     }
  </code></pre>
  
  <p>this is the login api.
  so if already logged in. i am  redirecting to ipadd:8080/ or else keep in login page itself.</p>
  
  <pre><code>@app.route('/', methods=['GET'], strict_slashes=False)
  def index():
     render_template('index.html')
  
  @app.route('/login', methods=['GET'], strict_slashes=False)
  def login():
      """Render the login Page"""
      if check_for_session_util():
         return redirect(url_for("index"),_external=True)
      else:
        return render_template('login.html')
  </code></pre>
  
  <p>but when i hit the url "ipadd:8080/login" it redirecting to "ipadd/" instead of "ipadd:8080/"</p>