shieldfy / API-Security-Checklist

Checklist of the most important security countermeasures when designing, testing, and releasing your API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Headers

tautology0 opened this issue · comments

commented

This advice:

  • Send X-Content-Type-Options: nosniff header.
  • Send X-Frame-Options: deny header.
  • Send Content-Security-Policy: default-src 'none' header.

Is a bit misguided as they only really have relevance if HTML is returned. If the API returns JSON or raw text there is no way that they can be affected by XFO or CSP.

I can see an argument for XCTO in some circumstances (e.g. SOAP requests).

I'd also include Strict-Transport-Security in the list as that really should be issued by pretty much everything HTTP page.