Questions tagged [http-referer]

The referrer, or HTTP referrer — also known by the common misspelling referer that occurs as an HTTP header field — identifies, from the point of view of an Internet webpage or resource, the address of the webpage of the resource which links to it. By checking the referrer, the new webpage can see where the request originated.

http-referer
Filter by
Sorted by
Tagged with
0 votes
0 answers
223 views

CSRF issue in django

settings.py INSTALLED_APPS = [ ... 'corsheaders', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', '...
2 votes
3 answers
3k views

PHP mobile detection with new iPadOS/iOS 13

I was wondering if there was any documentation or any new libraries which can detect the new iPadOS / iOS 13? They used to output: mozilla/5.0 (ipad; cpu iphone os 12_1_3 like mac os x) applewebkit/...
18 votes
5 answers
78k views

Redirect to referer url in codeigniter

In messaging system of my project when you get a message from a user you a email alert saying that the another user has sent a message to view the message click here (i.e the url of message) So if the ...
0 votes
0 answers
887 views

Understanding different Referrer-policy and what is sent when

I am creating a class (es) in php to validate if referrers received in the headers adhere to the Referrer-policy set for the document. I have tried to create a table which will tell me when a referer ...
2 votes
1 answer
1k views

Django + CloudFront caching without HTTP_REFERER

We use django 1.8. on backend with default authorization that runs on elasticbeanstalk and AWS CloudFront to cache app pages on CDN level. The problem is that we want to whitelist as few http headers ...
0 votes
0 answers
25 views

How to figure out what website you came from in PHP?

I am trying to figure out if someone is coming from a designated website that I have made using $_SERVER['HTTP_REFERER'], and when I echo the website that it is coming from I can get the page URL that ...
0 votes
1 answer
2k views

How to use HTTP_REFERER in PHP [duplicate]

I know this may be a duplicate of another link on here but I am not able to find a fix for my code. I am trying to make a puzzle for my friends and family can try to do and I need a way to track what ...
1 vote
0 answers
122 views

Return to previous page

Let me start with 1) I know just enough to get myself in trouble most of the time and out of it occasionally. 2) I am stuck with a very old shopping cart, but it serves my purpose, and I am already 5 ...
0 votes
0 answers
87 views

How to identify mobile native traffic in a web app?

Let's say a mobile native application on iOS or Android has a link to Website X. When a user clicks the link inside the mobile native application, there would be no HTTP referrer headers to look at. ...
7 votes
4 answers
794 views

Duplicate Referrer Header - HTTP.sys barfs

I have been testing the PS3 browser (NetFront) with embedded Flash components on a web page and there seems to be a rather serious bug with the way that any requests from Flash are issued. The browser ...
0 votes
1 answer
424 views

How to improve anti scraping for S3 bucket with specific referer policy and CloudFront distribution

The current situation is that I have a CloudFront distribution with a OAI pointing to my images bucket that are served in my app. I've managed to make the bucket policy to only allow the getObject ...
0 votes
1 answer
125 views

Referer spoof via built-in modules

I've been wondered if there's way to spoof Referer on request using built-in expressions only, (no external modules like request.js, ajax or so) XMLHttpRequest throws error upon attempt to change ...
0 votes
0 answers
639 views

if request.META.get('HTTP_REFERER') working with Chrome but not Safari

I have the following function redirecting users if they have not come to the page from a Stripe checkout. The page will load if coming from a checkout on google chrome but if using safari on laptop on ...
-1 votes
1 answer
107 views

Post data from server A to Server B with Form

I am doing a ecommerce project. When user check out, system will redirect them to payment page(Provide by 3rd party). Show in the diagram. The solution that I am using is send a Post Request through ...
-2 votes
2 answers
84 views

I don't want to display ads to Facebook, Twitter Visitors

I am now using this code for facebook. "https" is active and wordpress site. <?php $ref = $_SERVER['HTTP_REFERER']; if (strpos($ref, 'facebook.com') != false) { ?> DON'T ...
44 votes
1 answer
35k views

How reliable is HTTP_REFERER?

I need to check and record the referrer of visitors to my web application. How reliable is using HTTP_REFERER? And are there other alternatives?
0 votes
0 answers
358 views

Can you make a http request and forge the Referer value to be some arbitrary website?

I'm new to HTTP protocol and I have limited experience in networking. I'm wondering which http request headers can be set arbitrarily and which headers cannot. For example, can I create a http request ...
6 votes
0 answers
201 views

How to automatically configure HTTP referrers in Google API console for web hosting for firebase preview channel hosting?

Whenever I deploy a website in Firebase hosting, first I run them in firebase preview channel with the preview channel name as alpha The command for deploying to preview channel is firebase hosting:...
0 votes
0 answers
267 views

document.referrer is empty in IE11

I have a problem with document.referrer in IE. I can see the referer in the request header but document.referrer always give me an empty string. It works in other browser. I have a link pointing to ...
0 votes
1 answer
648 views

Is there a way to block only the main domain in Nginx referrer but not the paths

I need to know if there is a way to block only the main domain as the referrer url's in Nginx. Like i want to block request with referrerurl: www.example.com but not if the request is from referrerurl:...
8 votes
2 answers
22k views

Only allow users from specific referrer (redirect the rest) - HTACCESS

I've been trying to block access from everyone that is trying to see a .php page without coming from my specific tracking link. I want that if they're not coming from my link, they be redirected to ...
1 vote
1 answer
342 views

How to hide referrer in safari browser?

I am using header("Referrer-Policy: no-referrer"); in PHP to hide referrer its working in all browser except safari and edge. How can i achieve the same functionality of hide referrer in ...
-1 votes
3 answers
736 views

Issue loading PNG from Blob with PHP

okay so it is appearing to me my header() isn't doing anything. i tried moving it to the very top of the file instead nothing changed unless I put it in its own but then the rest of the file doesn't ...
0 votes
0 answers
280 views

Best way to use the current URL as a parameter to external API in javascript

I would like to know what is the best way fetch a resource from our client's site to our servers with the Fetch API (GET). In order to do so we need to send the current URL since the resource depends ...
7 votes
3 answers
3k views

Strip out referers from script src

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 vote
0 answers
728 views

Server-side http referrer blocking - as complete and universal as possible

Server-side http referrer blocking may be achieved by including in the webpage header:<meta name="referrer" content="no-referrer" /> Remove http referer https://scotthelme.co.uk/a-new-security-...
0 votes
0 answers
273 views

How to require a REFERER for a specific path in apache2 webserver?

<Location /my-app/files> Require all granted </location> I want to restrict access to /my-app/files by using the %{HTTP_REFERER}. Let's for example I want to grant access only for ...
1 vote
1 answer
1k views

Get method type of previous url in Laravel

I want to get the method type (POST and PUT) of previous URL in Laravel. For ex. I have used Resource routes. So let's assume there are 2 pages Create Product and Edit Product. Both pages contains a ...
0 votes
0 answers
125 views

From which country does php cURL access to page.. users or servers

I'm trying to access a page's content using PHP cURL with following function $target_url = "http://www.amazon.com"; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); ...
0 votes
1 answer
619 views

iis 10 rewrite module add request header

I am new to IIS try to use IIs AAR as reverse proxy and Rewrite Module to redirect the url but the url i want redirect to does not allow the blank referer, else get 403 forbidden is there any way to ...
-2 votes
1 answer
94 views

Check is page is visited (through anchor tag) by only allowed websites

Lets say I have a website abc.com/redirect.php which has an anchor tag which links blank to xyz.com/landing.php. I want to check if the xyz.com/landing.php is opened only through abc.com/redirect.php ....
3 votes
4 answers
3k views

PHP: How to detect direct requests of external visitors?

I would like to detect/prevent/forward direct requests of external visitors. Some scripts should only be displayed in a jQuery dialog. My current code: <script> $(".dialog").click(function() {...
9 votes
3 answers
12k views

Safari mobile and desktop are hiding full referrer URL: why?

I have a website, www.a.com In that website, I serve a page at https://www.a.com/mypage that contains this: <script src='https://www.b.com/anotherpage'></script> If I visit from every ...
0 votes
0 answers
327 views

Google Maps Static API - Referer Policy Issue

I have created an API Key, assigned Static Map api only and applied referer policy e.g. www.example.com. My expectations was this api key should only succeed if http referer header equals to "www....
0 votes
0 answers
109 views

Serve a different cache file with a HTTP_REFERER condition in my .HTACCESS

If a visit is coming from apple.com I want to serve the index2.html file: RewriteCond %{REQUEST_URI} !^.*[^/]$ RewriteCond %{REQUEST_URI} !^.*//.*$ RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{...
13 votes
2 answers
46k views

Nginx: allow access only to referrer that match location name

Is there a way, in nginx, to allow access to a "location" only to clients with a referrer that matches the current location name? This is the scenario: http://foooooo.com/bar.org/ http://foooooo....
35 votes
2 answers
29k views

Get referring URL for Flask request

When a user visits our site and signs up, how can I capture which website they came from? Be it search, a PR website, etc. I don't care what page from our site they visited, I just want to know which ...
0 votes
1 answer
891 views

Get Url from which the Redirection has been made

I am using the symfony framework, with FOS User Bundle. I have a URL https://my-domain/article/view/articleId on my website to display the content of an article. For this url, I have a security check ...
0 votes
0 answers
635 views

How dynamic change Referer CefSharp?

How dynamic change Referer in CefSharp? My handler: public class CustomResourceRequestHandler : ResourceRequestHandler { public static string Referer = Program.refererUrl; ...
1 vote
0 answers
351 views

Firefox extension dev: howto fix wrong "Referer" in XMLHttpRequest

I am trying to program a simple Firefox (66.0 Quantum) Extension intended to download complete HLS video streams. The basic approach is to start video-playback using the page's regular UI ...
1 vote
1 answer
2k views

Prevent direct access to mp4 (IE/Edge ignoring HTTP_REFERER)

I would like to show videos (mp4) on my website but want to prevent direct access (example.com/videos/vide1.mp4). I managed to add restriction to .htaccess which I placed to video folder: ...
1 vote
0 answers
501 views

401 Unauthorized when authenticating using referer

I am trying to use an API which says to use it in a custom application to set a custom referer. Here's the official text: The API requires (if enabled) a token for read operations to be send to ...
0 votes
1 answer
438 views

Passing referrer to another page using JS or PHP

i am trying for this, i have two pages : http://example.com/first-page and http://example.com/second-page Here http://example.com/first-page is a simple landing page which has only a captcha to ...
13 votes
3 answers
13k views

ASP.NET - Response.Redirect Not Populating Url Referrer

I feel like i've done this a ton of times, but i can't for the life of me figure out what is going wrong. Default.aspx: protected void Page_Load(object sender, EventArgs e) { var r1 = Request....
0 votes
1 answer
2k views

Allow access via reverse proxy by http referer

I've just been given an apache2 reverse proxy server to look after. I've been asked to set up access a gis system using https which is all fine. I want to know if there's any way of configuring the ...
0 votes
1 answer
37 views

How can I predict or check if an external website (not owned by me) will send me a value for $_SERVER['HTTP_REFERER'] [duplicate]

HElp me to predict or check by pinging or by any other method whether an external website (not owned by me) will send me a value for $_SERVER['HTTP_REFERER']. I do not have control from that website(...
2 votes
1 answer
2k views

How to restrict Google Map API key in mobile app?

I have a cordova/ionic mobile app that loads google maps (in the index.html main file) into the app (both android and ios) using: https://maps.googleapis.com/maps/api/js?key=AndroidKey and https://...
2 votes
0 answers
755 views

PHP: How do I get the URL of the link that was clicked not the URL of the refering site?

How do I get the URL of the clicked link, not the URL of the referring site with PHP? I understand that $_SERVER['HTTP_REFERER'] will give me the URL of the referring page, but how do I get the URL ...
1 vote
1 answer
8k views

python requests: adding "referer" header to redirected requests

I am wondering if python requests support "autoreferer" functionality in curl. Basically, for allow_redirects=True, the requests should set the "Referer" header for subsequent redirected requests ...
5 votes
3 answers
28k views

Nginx - How do I know when $http_referer is not set or empty?

How do I know when the nginx variable $http_referer is not set or empty? I receive some requests that don't have a http referer. In nginx logs $http_referer appears like that: "-". What I am trying ...

1
2
3 4 5
12