Title: GitHub · Where software is built
Open Graph Title: angular/angular
X Title: angular/angular
Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Open Graph Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
X Description: Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub.
Opengraph URL: https://github.com/angular/angular
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for Content-Security-Policy using HASH (sha-256)","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\r\n\r\n@angular/core\r\n\r\n### Description\r\n\r\nHi. I was trying to implement the HASH approach (CSP level 2) without success.\r\n\r\nThe main problem is that when the Angular app is loaded, all styles are added inline to the index.html HEAD.\r\nSince the styles have IDs (this Angular self-generated one) in the CSS code, I'd need to generate the hash after this CSS changed but my Content-Security-Policy header already came from the API that is generating it.\r\nExternal docs: https://content-security-policy.com/hash\r\n\r\nI haven't found anything related in the official docs. I only found info related to the 'nonce' approach. \r\nAngular official doc related: https://angular.dev/best-practices/security#content-security-policy \r\nExternal docs: https://content-security-policy.com/nonce/\r\n\r\nAre you working already on a solution?\r\n\r\n### Proposed solution\r\n\r\nAdd support for this feature (like the 'nonce' one).\r\n\r\n### Alternatives considered\r\n\r\nLet Angular handle generating the hashes for all scripts and styles at compile time.","author":{"url":"https://github.com/jlfrances","@type":"Person","name":"jlfrances"},"datePublished":"2024-05-30T11:29:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/56181/angular/issues/56181"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:cf638f90-2f82-bd3e-e101-822e79102032 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91A0:14F335:5BF2B9F:77D7B6C:697537DD |
| html-safe-nonce | cd59727d868a5a301fae9f3f4040742db4ec7eb337d5f0d64c9eae56797b3347 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUEwOjE0RjMzNTo1QkYyQjlGOjc3RDdCNkM6Njk3NTM3REQiLCJ2aXNpdG9yX2lkIjoiMjIzODMyMzQ2MjIxMDE0MDEyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 48671f5b7315a002f4523c9626261bfa0c3a1f43d8ffa31c4c916ab2335c5f80 |
| hovercard-subject-tag | repository:24195339 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angular/issues/56181 |
| twitter:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/24195339/d4194dc2-d880-43f7-960c-ea30e05c6531 |
| og:image:alt | Deliver web apps with confidence 🚀. Contribute to angular/angular development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-cache |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width