{"id":20061663,"url":"https://github.com/tylerrick/webpacker_angular_csp","last_synced_at":"2026-05-06T14:38:42.865Z","repository":{"id":38747854,"uuid":"192953506","full_name":"TylerRick/webpacker_angular_csp","owner":"TylerRick","description":"A Rails app demonstrating how Angular requires unsafe_eval in Content-Security-Policy even in production :(, despite claims to the contrary by webpacker","archived":false,"fork":false,"pushed_at":"2023-01-19T13:26:40.000Z","size":877,"stargazers_count":0,"open_issues_count":35,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-15T06:14:14.067Z","etag":null,"topics":["angular","content-security-policy","rails","webpacker"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TylerRick.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-20T16:28:10.000Z","updated_at":"2019-06-21T02:51:07.000Z","dependencies_parsed_at":"2023-02-11T01:30:21.663Z","dependency_job_id":null,"html_url":"https://github.com/TylerRick/webpacker_angular_csp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TylerRick/webpacker_angular_csp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerRick%2Fwebpacker_angular_csp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerRick%2Fwebpacker_angular_csp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerRick%2Fwebpacker_angular_csp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerRick%2Fwebpacker_angular_csp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TylerRick","download_url":"https://codeload.github.com/TylerRick/webpacker_angular_csp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerRick%2Fwebpacker_angular_csp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32698800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","content-security-policy","rails","webpacker"],"created_at":"2024-11-13T13:21:26.719Z","updated_at":"2026-05-06T14:38:42.846Z","avatar_url":"https://github.com/TylerRick.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpacker Angular CSP demo\n\nA Rails app demonstrating how to configure webpacker/webpack to use Ahead-Of-Time (AOT) compilation\n(using [@ngtools/webpack](https://www.npmjs.com/package/@ngtools/webpack#usage) plugin) instead of\nthe default Just-In-Time (JIT) compiler that uses eval and therefore violates any Content Security\nPolicy that doesn't include `:unsafe_eval` as an allowed `script_src`.\n\nHow to prove that it's working:\n\n1. Compile assets and start web server\n  ```\n  rm -rf public/packs\n  RAILS_ENV=production rails assets:precompile\n  RAILS_ENV=production r s\n  ```\n2. Go to http://localhost:3000/\n3. Observe that page shows \"Hello Angular\" and there are no Content Security Policy warnings in console\n\nYou can also enable the `BundleAnalyzerPlugin()` in `config/webpack/environment.js` and observe that\nthat the Angular `Compiler` module is *not* included.\n\n## Original problem\n\nSee https://github.com/rails/webpacker/issues/1737 for the problem this fixes.\n\nSee [`aot_broken_by_default`](https://github.com/TylerRick/webpacker_angular_csp/tree/aot_broken_by_default) branch for a demonstration of the problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerrick%2Fwebpacker_angular_csp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerrick%2Fwebpacker_angular_csp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerrick%2Fwebpacker_angular_csp/lists"}