How to set header X-Content-Type-Options “nosniff” in Angular/SpringBoot application?

1.2k views Asked by At

i need to add X-Content-Type-Options:nosniff header in every response coming from my application any response from backend has this header already present but i want to add this header also with index.html and other file.

1

There are 1 answers

0
Rajat Sahu On BEST ANSWER

I achieved this by configuring headers from my spring boot application. Since our application was a single deployment application (frontend and backend in one build).

If you want to achieve something similar it could be done by configuring headers at the server level.