Project

General

Profile

Actions

Defect #5345

closed

back_url and other variables always uses 127.0.0.1

Added by Matt Olenik about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-04-19
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

In the query string, back_url always reads 127.0.0.1:4001. I have the "host name and path" setting set to mydomain.com/redmine, but back_url is always broken. Other things that reference the hostname seem to be broken as well, such as OpenID login. I noticed these variables in the query string when OpenID login fails with a 404:

openid.realm=http://127.0.0.1:4001/redmine/
openid.return_to=http://127.0.0.1:4001/redmine/login%3F_method%3Dpost%26open_id_complete%3D1

I'm using IIS and proxying requests to Mongrel with an appropriate URL rewrite rule. Everything else seems to work fine.

Here's the contents of the log file when I log out and return to the login page:

Processing AccountController#logout (for 129.21.137.28:50364 at 2010-04-19 02:53:46) [GET]
  Parameters: {"action"=>"logout", "controller"=>"account"}
Redirected to http://127.0.0.1:4001/redmine/
Completed in 10ms (DB: 4) | 302 Found [http://127.0.0.1/redmine/logout]

Processing WelcomeController#index (for 129.21.137.28:50365 at 2010-04-19 02:53:46) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://127.0.0.1:4001/redmine/login?back_url=http%3A%2F%2F127.0.0.1%3A4001%2Fredmine%2F
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 6ms (DB: 2) | 302 Found [http://127.0.0.1/redmine/]

Processing AccountController#login (for 129.21.137.28:50362 at 2010-04-19 02:53:46) [GET]
  Parameters: {"back_url"=>"http://127.0.0.1:4001/redmine/", "action"=>"login", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/login
Completed in 22ms (View: 16, DB: 3) | 200 OK [http://127.0.0.1/redmine/login?back_url=http%3A%2F%2F127.0.0.1%3A4001%2Fredmine%2F]
Actions #1

Updated by Matt Olenik about 15 years ago

Sorry, forgot to mention: sqlite 3.6.23.1, Rails 2.3.5, Ruby 1.8.7, Windows Server 2008 R2. Category shouldn't be UI either, I left it blank but it seems to have chosen that one.

Actions #2

Updated by Eric Davis almost 15 years ago

  • Category deleted (UI)

Looks like IIS isn't rewriting the links that come back from mongrel.

Actions #3

Updated by Matt Olenik almost 15 years ago

  • Status changed from New to Resolved

You're right. My rewrite rule wasn't rewriting the LOCATION header in the response. Got confused since it worked elsewhere... thanks!

Actions #4

Updated by Felix Schäfer almost 15 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF