Issue: X-Content-Type-Options header missing

13.3k views Asked by At

How to fix the issue like X-Content-Type-Options header missing?

Bug detector found this issue.

1

There are 1 answers

1
Anto S On

There are some Web Application Security Platforms (eg. VEGA) detects an issue like Issue: X-Content-Type-Options header missing. When I google for the solution it recommends that it is not a serious issue. And unable to find the proper solution. Finally I found that setting a header will fix the issue. This issue not on html level but on server side. In php we can include the header as below

<?php 
     header('X-Content-Type-Options: nosniff');

     ...
     ...

?>

And it should be included in all pages.