Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:19:26+00:00 2026-06-17T23:19:26+00:00

all – I’m having an issue trying to deploy a site that uses the

  • 0

all – I’m having an issue trying to deploy a site that uses the Flask-OpenID extension. On localhost, I have no problems moving through the full login -> after login cycle – but on my production server, which is running an Nginx proxy in front of the Flask app (running with Gunicorn) I’m getting errors with the openid.realm and openid.return_to parameters of the response from any provider I connect to.

Basically, realm and return_to are pointing at my downstream Flask app instead of the proxy server. For example, for an intended “next” url of http://www.foo.com/login/ the Flask-OpenID machinery is making the provider instead target http://127.0.0.1:8000/login/?next=/login/, which is the localhost and port my Flask app is running on.

Is there any way to control this behavior and have Flask-OpenID correctly redirect through the proxy server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:19:27+00:00Added an answer on June 17, 2026 at 11:19 pm

    It sounds like your proxy server isnt passing on the HOST header, using nginx you can use proxy_set_header Host $host; in your location directive.

    You may also want to look at setting the X-Forwarded-For and X-Forwarded-Proto headers so you can read the actual client IP and protocol correctly. Werkzeug provides a fixer to help with this, and there’s an example detailed in the Flask docs, request.remote_addr should then be what you expect.

    Here’s a more complete nginx location directive:

    location / {
        proxy_pass  http://localhost:8000/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Simple.Data and have been trying to find an example that will
all. Let's say I have a program that contains a long list of C
All, I have created a plugin that I will be using across several projects.
All- I am trying to get the user's current location than display that on
All of the guides and tutorials that I have read tell me to do
All -- I have these two methods in one of my classes: public static
All I want to do is return the index of the i that is
all. We're trying to get some intersect collisions working, but the problem experience is
All of a sudden, Facebook sharing has stopped working on my site. It's been
All, I have the following class structure public class Foo : IComparable<Foo> { public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.