4

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

Bug detector found this issue.

SOFe
  • 7,867
  • 4
  • 33
  • 61
Anto S
  • 2,448
  • 6
  • 32
  • 50

1 Answers1

5

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.

Anto S
  • 2,448
  • 6
  • 32
  • 50
  • 1
    read this to find out whal nosniff means: https://stackoverflow.com/questions/18337630/what-is-x-content-type-options-nosniff – rubo77 May 04 '20 at 23:36