search for: http_referer

Displaying 20 results from an estimated 48 matches for "http_referer".

2009 Aug 27
2
Setting @request.env["HTTP_REFERER"] in an integration test
Hi. I would like to set @request.env["HTTP_REFERER"] in an integration test, but due to its nature, I would naturally set this value to the previousle request url. How do I do that. Thanks. Jarl
2007 Feb 22
4
Modifying Apache Conf To Block Leachers
...xpect this to send the user to error.html if the referrer is not the site in question but nothing at all happens... Any suggestions appreciated, this stuff drives me batty. URL: http://www.mysite.com/audio_file/the_audio_file/file.mp3 RewriteCond %{REQUEST_FILENAME} .*mp3$ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !mysite\.com [NC] RewriteCond %{HTTP_REFERER} !friendlysite\.com [NC] RewriteCond %{HTTP_REFERER} !google\. [NC] RewriteCond %{HTTP_REFERER} !search\?q=cache [NC] RewriteRule (.*) /error.html RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f RewriteCond %{SCRIPT_FIL...
2007 Feb 22
1
HTTP_REFERER support?
Hello, we want to read the referer URL from the HTTP headers, in order to be able to track where someone is coming from, in a Rails application. As I can see in the source, Mongrel doesn''t even parse the HTTP_REFERER field from HTTP requests. This would make a useful feature, I guess. Apart from that, Mongrel is (IMHO) simply the best solution for deploying Rails - keep on going! Greetings Martin
2006 Jan 30
10
How do I get the the full URL of an incoming request
Hey, Is is possible to get the full URL (''http://www.sender-domain.com/links/list.html'') from where a user was sent to my site (www.my-domain.com/controller/action) e.g. by clicking on a link? (I read about something called a ''request'' object, I don''t know what it is or does, is that what I''m looking for? I''m very new to Rails
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env["HTTP_REFERER"]. I can''t really understand why there is no http_referer, how is back button working on views? Is it possible to impl...
2006 Aug 05
3
Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection?
...a files. I am finding that a lot of people are "hot linking" to these media files and would like to prevent this to save bandwidth. Usually in the past, it hasn''t been a problem, I would add something like the following to my .htaccess file RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC] RewriteRule .(gif|jpg)$ - [F] However, with my httpd config containing the following lines now: ProxyPass / balancer://mycluster/ ProxyPassReverse / balancer://mycluster/ ProxyBlock images media Options Indexes FollowSymLinks Th...
2007 Feb 18
2
SerializationTypeMismatch in Production Mode
...fine. In fact, if I set to false config.cache_classes in production.rb, it works fine. The first time you hit the page, it works fine. Upon refresh, it returns that error. This happens with both webbrick and litespeed. The controller code is: def new store_location if request.env["HTTP_REFERER"] params[:my_id] = "survey" if request.env["HTTP_REFERER"].include? "survey" end @question = Question.new @question.answers_container = Array.new(2, "") @question.creator_message = current_user[:note] if logged_in? end In my mode...
2006 Apr 18
6
Best Practice for Returning to Calling Page?
I have a partial, it''s a shopping cart display, it''s designed to appear on several different pages of my site. One of the buttons on the shopping cart empties the cart, and then I want the calling page to redisplay. In other words, the cart controller needs to return the visitor to the same page -- however since the cart could appear on any given page, this has to be
2006 Jul 10
4
Test Mongrel 0.3.13.4 Please
Hey Folks, There''s a nasty little bug in 0.3.13.3 when running in development mode which could cause all sorts of problems. Please grab the pre-release of 0.3.13.4 and tell me if it works for you: gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Thanks! -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need
2006 Jul 25
11
Prevent users from entering urls
How could I make it so that links on my page could link to a controllers action, but if the user manually entered the url, it would redirect them back to the main page? Is this possible? Thank you, -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2017 Mar 22
2
GSoC 2017: Letor Click Data Mining
...in query.cc that I can across while on the word_in_list PR: "$or{$env{REMOTE_HOST},$env{REMOTE_ADDR},-}\t" "[$date{$now,%d/%b/%Y:%H:%M:%S} +0000]\t" "$if{$cgi{X},add,$if{$cgi{MORELIKE},morelike,query}}\t" "$dbname\t" "$query\t" "$msize$if{$env{HTTP_REFERER},\t$env{HTTP_REFERER}}"; Could you explain the meaning of third and and last strings? > You need to think more carefully about the layers involved here. We don't > want to post-process the output of a template... Yes, so I thought about it in detail and I think the whole process w...
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a
2009 Aug 18
1
httpd .htaccess rewrite for images
...;m running httpd on a Centos 5.3 machine. I'm trying to use .htaccess to disable direct linking to site images. I've got the following rewrite rule, the domain is test.example.com which is at /var/www/test.example.com under which is a directory called images. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(test\.)?example.com/.*$ [NC] RewriteRule \.(jpg|gif)$ - [F] In my httpd virtual host directive i have: alias /images "/var/www/test.example.com/images" <Directory "/var/www/test.example.com/images"> Options None AllowOverride No...
2007 Mar 15
0
RedirectBackError
when i am doing functional testing it gives a error, "RedirectBackError: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be call successfully. If this is a test, make sure to specify request.env["HTTP_REFERER"]." what i have to do? any one can give the answer --~--~---------~--~----~------------~-------~--~----~ You received this...
2007 Jun 29
0
acts_as_authenticated, reset_session, and redirect_back_or_default
...] that the method uses to set where it will redirect. I ended up adding a version of redirect_back_or_default to the account controller that works for me (and as a benefit it keeps me from having to set session[:return_to] which stunk) def redirect_back_or_default(default) if request.env["HTTP_REFERER"].nil? redirect_to default else redirect_to(request.env["HTTP_REFERER"]) # same as redirect_to :back end end My question is, am I just missing something, is there a different version of code out there, or is this thing really broken. Anyway, thanks, Charles Church...
2006 Mar 09
3
redirect_to :back question
Hi! How to use this? I can declare it only inside a controller, so i tried to do add this to application controller: def back redirect_to :back end so i could call in all my views link_to ''back'', :controller => ''application'', :action => ''back'' but it doesn''t work - there are no errors, but i''m still on the same
2006 May 26
1
Redirecting user on object.save failures
...the form was submitted from (in a transparent, HTTP 303 fashion). I''ve tried using redirect_to :back instead, which works, but the error information is not carried across and displayed as it would be when I was using render. What I''ve thought about doing instead is parsing the HTTP_REFERER environment variable (falling back to the root directory), grabbing the controller and action from that, and passing those to the render method, but I can''t help but feel there''s a tidier way of doing what I want. Any thoughts? -- Posted via http://www.ruby-forum.com/.
2006 Mar 09
4
Stop users accessing methods.
Hello all. Is there a way to stop users from being able to access a controllers methods without affecting the ability of other controllers to use them? i.e FooController def secret #Stuff end end BarController def index redirect_to :controller => ''foo'', action => ''secret'', :id => ''007'' end end But directly
2007 May 30
0
Headers munged into RAW_POST_DATA
...HTTP_ACCEPT_ENCODING : gzip,deflate * HTTP_ACCEPT_LANGUAGE : en-us,en;q=0.5 * HTTP_CONTENT_LENGTH : 582 * HTTP_CONTENT_TYPE : application/x-www-form-urlencoded * HTTP_COOKIE : accepting=1; * HTTP_HOST : foo.com * HTTP_MAX_FORWARDS : 10 * HTTP_REFERER : https://foo.com/ad_keywords/new?ad=5&cid=7 * HTTP_USER_AGENT : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 * HTTP_VERSION : HTTP/1.0 * HTTP_X_BROWSER_TIMESTAMP: 386789 * HTTP_X_FORWARDED_FOR : xx.xxx.xxx.x...
2007 May 29
1
Headers munged into RAW_POST_DATA
...CEPT_ENCODING : gzip,deflate * HTTP_ACCEPT_LANGUAGE : en-us,en;q=0.5 * HTTP_CONTENT_LENGTH : 582 * HTTP_CONTENT_TYPE : application/x-www-form-urlencoded * HTTP_COOKIE : accepting=1; * HTTP_HOST : foo.com * HTTP_MAX_FORWARDS : 10 * HTTP_REFERER : https://foo.com/ad_keywords/new? ad=5&cid=7 * HTTP_USER_AGENT : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 * HTTP_VERSION : HTTP/1.0 * HTTP_X_BROWSER_TIMESTAMP: 386789 * HTTP_X_FORWARDED_FOR : xx.x...