I am trying have some custom header value set from a sevlet and access from a page which redirects to.
On the Sevlet side, I have
response.setHeader("value", "ABC");
response.sendRedirect("page.html");
On the page, I have js code
var req = new XMLHttpRequest();
req.open('GET', document.location, false);
req.send(null);
var headers = req.getAllResponseHeaders().toLowerCase();
but the headers object does not contain any custom header.
Is there anything missing?
Kind Regards