Skip to content

docs(secure-headers): quote 'none' in styleSrcAttr example - #935

Open
n-hiraha wants to merge 1 commit into
honojs:mainfrom
n-hiraha:fix-secure-headers-style-src-attr
Open

n-hiraha wants to merge 1 commit into
honojs:mainfrom
n-hiraha:fix-secure-headers-style-src-attr

Conversation

@n-hiraha

@n-hiraha n-hiraha commented Nov 9, 2026

Copy link
Copy Markdown

In the Content-Security-Policy example, styleSrcAttr: ['none'] is missing the inner quotes. Hono passes the values through as-is, so the header comes out as style-src-attr none, which browsers read as a host named none rather than the 'none' keyword. objectSrc and scriptSrcAttr in the same example already use "'none'".

Checked with hono 4.13.17:

["none"]   -> style-src-attr none
["'none'"] -> style-src-attr 'none'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant