Reputation: 725
I'm just trying out Spring boot, and with that I have simple test JSP-page I'd like to convert to thymeleaf. The JSP has a top page directive that sets a response header. How Can I do the same thing in thymeleaf?
Index.jsp
<%
response.setHeader("Content-Security-Policy-Report-Only", "default-src 'self');
%>
Upvotes: 0
Views: 2600
Reputation: 524
The short answer is, you don't. Not in Thymeleaf. Set the response header in the Spring MVC controller.
Upvotes: 2