shieldfy / API-Security-Checklist

Checklist of the most important security countermeasures when designing, testing, and releasing your API
MIT License
22.21k stars 2.57k forks source link

HTTP Headers #174

Open tautology0 opened 1 year ago

tautology0 commented 1 year ago

This advice:

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.