Mid-level Track Roadmap

Security: HSTS

This course examines the Strict-Transport-Security header that Rails sends when config.force_ssl is true. Its defaults send a two-year max-age with includeSubDomains and no preload. The lessons explain how browsers store and refresh HSTS rules, which gap a plain HTTP redirect leaves, and what includeSubDomains requires of every subdomain. They cover ramping max-age, disabling with max-age=0, the preload list and its requirements, and interactions with health checks, certificate renewal, cookies and local development. The course ends with a written HSTS plan.

What you'll learn

  • ✓What Rails' default HSTS options send and what they commit a domain to
  • ✓How browsers record, refresh and apply HSTS rules per host
  • ✓How to build a subdomain inventory from DNS, certificate transparency logs, ingress and the team
  • ✓How to ramp max-age safely and how to disable HSTS with max-age=0
  • ✓The preload list requirements and the cost of removal
  • ✓How HSTS interacts with health checks, ACME validation, cookies and development
Free preview · Lesson 1 4 min read

What this app is already promising

One line in config/environments/production.rb:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...