Skip to content

Instantly share code, notes, and snippets.

@rishi-raj-jain
Last active June 24, 2021 11:39
Show Gist options
  • Save rishi-raj-jain/8c1b3960548f1d10b1576605111a8494 to your computer and use it in GitHub Desktop.
Save rishi-raj-jain/8c1b3960548f1d10b1576605111a8494 to your computer and use it in GitHub Desktop.
HSTS (Strict-Transport-Security) Headers
const { Router } = require('@layer0/core/router')
new Router()
.get("/:route", ({ setResponseHeader }) => {
setResponseHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains")
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment