Skip to content

0.2.0

Compare
Choose a tag to compare
@0xTim 0xTim released this 23 Feb 22:22
· 141 commits to master since this release

Vapor Security Headers 0.2.0

This release adds support for the Referrer Policy header which basically dictates when then Referrer header can be sent with requests. The W3C proposal can be found here and a good explanation of the header can be found on Scott Helme's Blog.

There are no breaking with this release. To set this new header, just create a configuration and pass it to the security headers setup:

let referrerConfig = ReferrerPolicyConfiguration(.sameOrigin)
let securityHeaders = SecurityHeaders(referrerPolicyConfiguration: referrerConfig)