You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks a lot for you're awesome work on Hono. I really enjoy using it.
I've been using the CSS helper. It works well 🚀 But in combination with nonce-based CSP i.e. if inline script and style tags are only allowed, if a random nonce is set on each render (e.g., <style id="hono-css" nonce="1234"> or <script nonce="1234">, it doesn't work yet. Currently, there is no way to pass the nonce to the style and script tag.
For example, I'd like to be able to add the nonce to the <Style nonce="{c.get("secureHeadersNonce")}" /> to ensure the inline CSS is not ignored by the browser.
…ure Headers' middleware (Content-Security-Policy & nonce attribute) (#536)
* chore: fix vitepress warning that /public/ is not need for public assets honojs/hono#3694
* docs: add example of css helpers in combination with nonce Content-Security-Policy honojs/hono#3694
What is the feature you are proposing?
First of all, thanks a lot for you're awesome work on Hono. I really enjoy using it.
I've been using the CSS helper. It works well 🚀 But in combination with nonce-based CSP i.e. if inline script and style tags are only allowed, if a random nonce is set on each render (e.g.,
<style id="hono-css" nonce="1234">
or<script nonce="1234">
, it doesn't work yet. Currently, there is no way to pass the nonce to the style and script tag.For example, I'd like to be able to add the nonce to the
<Style nonce="{c.get("secureHeadersNonce")}" />
to ensure the inline CSS is not ignored by the browser.For example, a test could look as follows:
I'd like to help and contribute this feature and have started a possible implementation here: #3685 -> happy for feedback! thanks!
Related to
The text was updated successfully, but these errors were encountered: