Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong URL generation behind proxy #360

Open
rafamanzo opened this issue Jun 23, 2016 · 0 comments
Open

Wrong URL generation behind proxy #360

rafamanzo opened this issue Jun 23, 2016 · 0 comments
Labels

Comments

@rafamanzo
Copy link
Member

rafamanzo commented Jun 23, 2016

Have a look at mezuro.org.

It produces urls for push notifications as: http://mezuro.org:8085/repositories/<ID>/notify_push. This is the port it is running behind the proxy while the notifications should get pushed to 80.

Some goes for logging in hanging forever because devise tries to redirect forever to http://mezuro.org:8085/en. Have a look at the log:

I, [2016-09-02T10:53:22.454724 #2120]  INFO -- : Started POST "/en/users/sign_in" for 143.107.45.11 at 2016-09-02 10:53:22 +0000
I, [2016-09-02T10:53:22.463279 #2120]  INFO -- : Processing by Devise::SessionsController#create as HTML
I, [2016-09-02T10:53:22.463495 #2120]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"i1jsrz9QcCiyEzXWsjg4LG7IVWqK3sAwlA9Tqo0F9EQzxts0p32wW1ZEZm8xnCtaMrzzBFj7Uqd7Rpos10VRnA==", "user"=>{"email"=>"rr.manzo@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in", "locale"=>"en"}
D, [2016-09-02T10:53:22.471807 #2120] DEBUG -- :   User Load (2.0ms)  SELECT  "users".* FROM "users" WHERE "users"."email" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["email", "rr.manzo@gmail.com"]]
D, [2016-09-02T10:53:22.567553 #2120] DEBUG -- :    (1.2ms)  BEGIN
D, [2016-09-02T10:53:22.572526 #2120] DEBUG -- :   SQL (1.4ms)  UPDATE "users" SET "last_sign_in_at" = $1, "current_sign_in_at" = $2, "sign_in_count" = $3, "updated_at" = $4 WHERE "users"."id" = $5  [["last_sign_in_at", "2016-09-02 10:47:31.119789"], ["current_sign_in_at", "2016-09-02 10:53:22.564712"], ["sign_in_count", 13], ["updated_at", "2016-09-02 10:53:22.568246"], ["id", 9]]
D, [2016-09-02T10:53:22.597463 #2120] DEBUG -- :    (24.0ms)  COMMIT
I, [2016-09-02T10:53:22.601912 #2120]  INFO -- : Redirected to http://mezuro.org:8085/en

This may be affecting all url helpers.

@rafamanzo rafamanzo added the bug label Jun 23, 2016
@rafamanzo rafamanzo changed the title Wrong Notify Push URL behind proxy port Wrong URL generation behind proxy Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant