helmetjs / helmet

Help secure Express apps with various HTTP headers
https://helmetjs.github.io/
MIT License
10.18k stars 367 forks source link

`getDefaultDirectives` deep copy #465

Closed sohrb closed 4 months ago

sohrb commented 4 months ago

I slightly modified the test that you requested. I narrowed the type of one["img-src"] to an array of ContentSecurityPolicyDirectiveValue in order to have access to the push method. So I had to export the ContentSecurityPolicyDirectiveValue type. In this 7b1a20a the original code written using the spread operator fails the test. While this one acf4268 which utilizes the structuredClone API passes the test.

EvanHahn commented 4 months ago

Thanks. Could you rebase this against the ~5.x~ v8.0.0 branch?

sohrb commented 4 months ago

I didn't find any branch named 5.x. Am I missing something here?

EvanHahn commented 4 months ago

Sorry, wrong project! Could you rebase against the v8.0.0 branch?

sohrb commented 4 months ago

Rebase Done!