Hi,
when using Sightly how can I set a response header?
Thanks and best,
Ronald
Solved! Go to Solution.
Views
Replies
Total Likes
You would have to this via Java/Javascript use-api call.
There you can do something like getResponse().setHeader("a", "b");
Views
Replies
Total Likes
What use case you are trying to so with Sighty? If you want to set a header and return data in a HTTP response where you need to set a Header, why not use an AEM Sling Servlet?
Views
Replies
Total Likes
Hi,
I am using a Sling Servlet talking to Solr to get search results. Then the Servlet is using a RequestDispatcher to forward to the page rendering the search results.
I tried to set a Cache-Control header in the Servlet but it does not make it thru when using "forward" on the RequestDispatcher. Therefore I was thinking about adding the header in the Sightly template. Now I have seen that when I use "include" on the RequestDispatcher the request header is set.
Best,
Ronald
Views
Replies
Total Likes
You would have to this via Java/Javascript use-api call.
There you can do something like getResponse().setHeader("a", "b");
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies