apisyouwonthate / style-guide

A shared and somewhat opinionated style guide for everyone to enjoy.
141 stars 20 forks source link

Cache Control Warnings #47

Open philsturgeon opened 1 month ago

philsturgeon commented 1 month ago

As an API designer trying to reduce my server costs and carbon emissions, I would like a bit of hand holding around Cache-Control and other related headers.

  1. Warn if you didnt set cache control headers
  2. Warn if public is used on an endpoint with Authorization header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)