Hardening — Capstone: the shelter service · NestJS

Get the service ready for strangers: responses serialized so an entity's secrets cannot leak, a rate limit on everything and a tight one on sign-in, helmet's security headers, and CORS for the shelter's own front end and nobody else's.

What you will learn

Read the theory for Hardening

All Capstone: the shelter service lessons

All NestJS courses

loading types…

What you'll learn

  • Return entities safely: @Exclude() on a secret column and the ClassSerializerInterceptor for the whole app
  • Limit every route with the ThrottlerGuard, and tighten one route with @Throttle()
  • Add helmet's security headers and read what each one does
  • Allow one front end's origin with CORS, and check both a preflight it passes and one from an origin it refuses