rails request.env["HTTP_REFERER"] giving nil on heroku
Asked Answered
D

1

7

I have created a ruby on rails application. I am having below scenario

In localhost for getting referrer link i'm using request.env["HTTP_REFERER"] it's working perfectly not giving null.

I have uploaded the code in heroku , but request.env["HTTP_REFERER"] is giving nil , i have checked in heroku logs.

Please provide a suggestion why it's giving nil ? is there any way to get referrer link other than request.env["HTTP_REFERER"] ?

Delindadelineate answered 12/10, 2012 at 6:6 Comment(3)
Some question was in SF. [Please, see this question][1] This help for you? [1]: #3105211Impersonate
I can confirm the behavior of Heroku. However, we have a setup with Play Framework 2.1 / Scala. On localhost it works as designed. Any updates on this question from your side? Did you find a solution by now?Postdoctoral
I think more details about the referer page and the context of the `request.env["HTTP_REFERER"] would be helpful.Hanaper
H
1

request.env["HTTP_REFERER"] giving nil is acceptable when directly navigating to a page, I suggest to use link_to :back instead or specify where it should go back (link_to root_path).

Hester answered 31/1, 2014 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.