Reputation: 2733
How can one retrieve an HTTP header value such as REFERER
as opposed to using the CGI
scope?
For example, CGI can be used as such:
#CGI.HTTP_REFERER#
However, can a header value be retrieved in the same manner without having to use the <cfhttpparam>
parameter?
#HTTP_HEADER.REFERER#
Upvotes: 3
Views: 758
Reputation: 2733
Found the solution:
<cfdump var="#GetHttpRequestData()#" label="GetHttpResponseData() Values"/>
Source: https://www.bennadel.com/blog/1425-getting-header-values-from-a-coldfusion-request.htm
To expand on this a little more, the exact line of code would be:
#getPageContext().getRequest().getHeader("Referer")#
Upvotes: 3