duo-labs / webauthn.io

The source code for webauthn.io, a demonstration of WebAuthn.
https://webauthn.io
BSD 3-Clause "New" or "Revised" License
635 stars 116 forks source link

fix/csrf-issues-march-2024 #132

Closed MasterKale closed 3 months ago

MasterKale commented 3 months ago

This PR adds a new PROD_CSRF_ORIGIN env var that helps me define two slightly different values: one for the allowed production hostname, and one for the valid CSRF production origin. The values are slightly different and using the same value for both gets messy especially since I want Caddy to only host over https:// in production (which should be the same as the valid CSRF origin.)

Fixes #131.