Commit ca93d66
committed
docs(auth): fix misleading withSecurityHeaders CONSUMER NOTE
Per Copilot review on PR #290 (post-merge), the previous note suggested custom
HTML handlers could fix CSP blocking by "moving scripts/styles to external files
served from 'self'". That's wrong: the wrapper applies default-src 'none', so
even self-hosted scripts/styles/forms are blocked, and sandbox additionally
disables script execution and form submission outright.
The only viable path for an HTML custom handler is option (a): override the CSP
on its own response. The note now spells out what the wrapper actually does and
gives a concrete example of a relaxed CSP for a form-based custom provider.
Docstring-only change in both v1 (auth.go) and v2 (v2/auth.go). No behavior change.1 parent b19c8d7 commit ca93d66
2 files changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
0 commit comments