How to access nonce in Middleware?
How can we access the nonce introduced in https://github.com/TanStack/router/pull/5287 in Middleware
.server context, so that we can properly set the CSP header?GitHub
fix: nonce support by schiller-manuel · Pull Request #5287 · TanS...
Summary by CodeRabbit
New Features
Added optional nonce support to assets, enabling nonce attributes on rendered scripts, styles, and links.
Automatically propagates a configured nonce from route...
3 Replies
rival-blackOP•2mo ago
CSP is even mentioned here: https://tanstack.com/start/latest/docs/framework/solid/middleware#what-kinds-of-things-can-i-do-with-middleware though I did not find an example
correct-apricot•2mo ago
will be creating a full example and docs for that soon
rival-blackOP•2mo ago
Awesome, thanks.