adobe/htl-spec

Need syntax to access Referer in Request Header using HTL (SlightlyJS)

grbbabu opened this issue · 1 comments

Hi,
Could you please provide me the syntax to access Referer in Request Header using HTL (SlightlyJS) only?
Thanks in advance.
Ramesh babu

This is not a question pertaining to the specification. However, something along these lines should work:

"use strict";
use(function () {
    var referer = request.getHeader('Referer');
    if (referer !== null) {
        // code here
    }
});