|
|
@@ -56,8 +56,15 @@
|
|
|
|
|
|
# HSTS: prod-only. Setting it in dev would lock you out of plain-HTTP
|
|
|
# localhost on the same hostname (sticky for 1 year). Gate strictly.
|
|
|
+ # Value is operator-tuneable via the `HSTS_HEADER` env var so a
|
|
|
+ # deployment that wants to apply for the browser preload list can
|
|
|
+ # opt in by setting:
|
|
|
+ # HSTS_HEADER="max-age=31536000; includeSubDomains; preload"
|
|
|
+ # Default keeps the conservative no-preload value — preload-listing
|
|
|
+ # is a one-way commitment (browser preload removals take months) so
|
|
|
+ # we don't enable it by default (SEC_REVIEW F60).
|
|
|
@prod expression `{env.APP_ENV} == "production"`
|
|
|
- header @prod Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
|
|
+ header @prod Strict-Transport-Security "{$HSTS_HEADER:max-age=31536000; includeSubDomains}"
|
|
|
|
|
|
# CSP: docs viewer needs RapiDoc from jsDelivr + inline styles + the
|
|
|
# try-it-now feature posting to /api/v1/*. Everything else is JSON.
|