Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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"] ?

like image 392
emamul khan Avatar asked Oct 12 '12 06:10

emamul khan


1 Answers

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).

like image 52
Alexandre Magro Avatar answered Sep 18 '22 21:09

Alexandre Magro