I have a requirement from a client to check the referrer of the http request.If the referrer is from a particular list of websites, i will allow them to access to application other wise i have to direct them to a login page. Hope I'm clear with the requirement.
I have used httpRequest.getHeader("referrer")
to get the referrer and The code is working fine when the communication is between two http clients. Now the sender applications is moved to https and my referrer is coming is null in receiver application as https(sender) doesn't send any header in request.
Now Can any one suggest me a good way to validate that the request is from a trusted source. I want to validate the referrer is a trusted source or not. Let me know if I'm missing anything here.