http-referer

IFrame referer question - asp.net c#

时光总嘲笑我的痴心妄想 提交于 2019-12-10 18:33:09
问题 One of our application will be run in an iframe, inside salesforce and I'm having troubles with accessing the referer. They'd like us to do some referer checks, to make sure the request is coming from salesforce and we've been given the IP addresses to check against. My problem is that anytime I try to access the referer through either of the following two methods: HttpContext.Current.Request.ServerVariables["HTTP_REFERER"] HttpContext.Current.Request.UrlReferrer it returns me null. Any ideas

Strip out referers from script src

半腔热情 提交于 2019-12-10 17:37:21
问题 I'm doing a remote script-src <script src="http://thirdparty.com/test.js"></script> I don't want to send my http referer headers to thirdparty.com. How do I do it? 回答1: You would have to proxy the request for the script through your own server. For example: <script src="stripreferrer.php?url=http%3A%2F%2Fthirdparty.com%2Ftest.js"></script> Then, your server-side code would make the HTTP request sans referrer code, and pass the response to the client. 回答2: The answers from 2013 are obsolete:

contact form including referral of previous page

拜拜、爱过 提交于 2019-12-10 12:20:47
问题 I have a php contact form using POST and I want to automatically include the referring page on the form, that is the website linking to the contact form. This would normally be within my website. For example, www.website.com/nothere.php returns 404.php (with www.website.com/nothere.php as the address) on the 404 page I have a link to feedback.php which is a contact form. I want the referring URL (in this case "www.website.com/nothere.php") included on the submitted form. I understand I can

How to set the Referer header before loading a page with Ruby mechanize?

孤人 提交于 2019-12-10 10:13:04
问题 Is there a straightforward way to set custom headers with Mechanize 2.3? I tried a former solution but get: $agent = Mechanize.new $agent.pre_connect_hooks << lambda { |p| p[:request]['Referer'] = 'https://wwws.mysite.com/cgi-bin/apps/Main' } # ./mech.rb:30:in `<main>': undefined method `pre_connect_hooks' for nil:NilClass (NoMethodError) 回答1: The docs say: get(uri, parameters = [], referer = nil, headers = {}) { |page| ... } so for example: agent.get 'http://www.google.com/', [], agent.page

Can $_SERVER['SERVER_NAME'] be forged/faked?

只谈情不闲聊 提交于 2019-12-10 05:38:54
问题 Can the PHP variable $_SERVER['SERVER_NAME'] be forged or faked? I was planning on using that as a security measure for form posting. I would check to make sure that variable is my site name (www.example.com). I know HTTP_REFERRER can be faked, but I wasn't sure on this one. Thanks! 回答1: Actually $_SERVER['SERVER_NAME'] can be affected by what the client browser sends over... See http://shiflett.org/blog/2006/mar/server-name-versus-http-host for a through investigation on the issue. 回答2: By a

Referer missing in HTTP header of Selenium request

淺唱寂寞╮ 提交于 2019-12-08 17:05:22
问题 I'm writing some tests with Selenium and noticed, that Referer is missing from the headers. I wrote the following minimal example to test this with https://httpbin.org/headers: import selenium.webdriver options = selenium.webdriver.FirefoxOptions() options.add_argument('--headless') profile = selenium.webdriver.FirefoxProfile() profile.set_preference('devtools.jsonview.enabled', False) driver = selenium.webdriver.Firefox(firefox_options=options, firefox_profile=profile) wait = selenium

redirect and fake the referer at the sametime

偶尔善良 提交于 2019-12-08 11:21:51
问题 Is there a way to redirect the user to another site and fake the referrer at the same time.? Tried this with my code, i know its wrong but thats only how far i can get. <?php $page1 = "http://google.com"; $page2 = "http://yahoo.com/"; $mypages = array($page1,$page2); $myrandompage = $mypages[mt_rand(0, count($mypages) -1)]; $sites = array_map("trim", file("links.txt")); $referer = $sites[array_rand($sites)]; function fake_it($url, $ref, $agent) { $curl = curl_init(); $header[0] = "Accept:

Redirect to the url of the clicked (referred) link

血红的双手。 提交于 2019-12-08 05:00:57
问题 I have a scenario where the user receives an email from the system with a specific link which requires login. say for example the link is http://test.url.com/product/2 . Where clicking on this link redirects the user to the sign in page and should redirect to the received url upon success login. But the issue I am having is the system always redirects to the default location which is http://test.url.com/dashboard . To implement this I used http://symfony.com/doc/current/reference

htaccess Redirect only if the HTTP referrer does NOT equal something

≡放荡痞女 提交于 2019-12-08 01:22:31
问题 I have the following rules working to redirect chinese users to the chinese language version of the site: RewriteCond %{HTTP:Accept-Language} ^zh [NC] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ http://ch.example.com/$1 [L,R=301] RewriteCond %{HTTP:Accept-Language} ^zh [NC] RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://ch.example.com/$1 [L,R=301] This works great. However, there is a link that is supposed to take them back to the english

PHP, HTTP_REFERER not working on iframe?

ⅰ亾dé卋堺 提交于 2019-12-08 00:01:52
问题 Okay, here is my situation. I have a page, index.php, which is the mainsite (flash site) I have another page called iframe.php which contain iframe of index.php Another page, test.php. Inside have 2 links, 1st link is directly to index.php, another link is to iframe.php I tested: I click the 1st link, when i trace/echo the HTTP_REFERER, it displays "test.php", but I click on 2nd link, when i trace/echo the HTTP_REFERER, it displays "iframe.php". Why it display "iframe.php"? Is HTTP_REFERER