Avatar of Rohit Bajaj
Rohit Bajaj
Flag for India

asked on 

how to set common header for all RequestMappings in a controller

Hi,
In my controller i have the following line in each requestMapping method :
        response.setHeader(contentSecurityolicy.getHttpHeader(), contentSecurityPolicy.toString());

Open in new window


There are 4 such methods... Is there any way i can avoid this so as to specify this header only once in controller and
it gets added to all the responses ?


Thanks
JavaJava EE

Avatar of undefined
Last Comment
mccarl

8/22/2022 - Mon