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 how could I get hold of the referer?

PS: I'm aware that you can spoof the referer, but it's part of the requirement.