{"id":14962640,"url":"https://github.com/rodneylab/sveltekit-content-security-policy","last_synced_at":"2025-10-25T00:30:27.659Z","repository":{"id":37779081,"uuid":"506219726","full_name":"rodneylab/sveltekit-content-security-policy","owner":"rodneylab","description":"SvelteKit Content Security Policy: how you can add CSP to reduce your Svelte site's cross-site scripting (XSS) attack surface.","archived":false,"fork":false,"pushed_at":"2023-10-05T07:01:56.000Z","size":3131,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-29T11:58:07.603Z","etag":null,"topics":["cloudflare-pages","content-security-policy","csp","http-headers","netlify","svelte","svelte3","sveltekit"],"latest_commit_sha":null,"homepage":"","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodneylab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null}},"created_at":"2022-06-22T11:35:01.000Z","updated_at":"2024-06-09T05:59:17.000Z","dependencies_parsed_at":"2023-02-15T07:31:11.155Z","dependency_job_id":"bca379a0-4b65-4e13-943b-a90d81c48e63","html_url":"https://github.com/rodneylab/sveltekit-content-security-policy","commit_stats":{"total_commits":275,"total_committers":1,"mean_commits":275.0,"dds":0.0,"last_synced_commit":"006f7faa4fba35b9cff1a23dc6d0df1c493221eb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodneylab%2Fsveltekit-content-security-policy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodneylab%2Fsveltekit-content-security-policy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodneylab%2Fsveltekit-content-security-policy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodneylab%2Fsveltekit-content-security-policy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodneylab","download_url":"https://codeload.github.com/rodneylab/sveltekit-content-security-policy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867388,"owners_count":16555891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cloudflare-pages","content-security-policy","csp","http-headers","netlify","svelte","svelte3","sveltekit"],"created_at":"2024-09-24T13:30:18.126Z","updated_at":"2025-10-25T00:30:27.139Z","avatar_url":"https://github.com/rodneylab.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./images/rodneylab-github-sveltekit-content-security-policy.png\" alt=\"Rodney Lab sveltekit-content-security-policy Github banner\"\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"Open Rodney Lab site\" href=\"https://rodneylab.com\" rel=\"nofollow noopener noreferrer\"\u003e\n    \u003cimg alt=\"Rodney Lab logo\" src=\"https://rodneylab.com/assets/icon.png\" width=\"60\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\n  SvelteKit Content Security Policy\n\u003c/h1\u003e\n\n# sveltekit-content-security-policy\n\n[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rodneylab/sveltekit-content-security-policy)\n\nHow you can generate Content Security Policy HTTP Headers for your static SvelteKit site deployed to Netlify or Cloudflare Pages. The code accompanies the \u003ca aria-label=\"Open Rodney Lab post on Svelte Charts\" href=\"https://rodneylab.com/sveltekit-content-security-policy/\"\u003epost on SvelteKit content security policy\u003c/a\u003e. If you have any questions, please drop a comment at the bottom of that page.\n\n## Building and previewing the site\n\nIf you're seeing this, you've probably already done this step. Congrats!\n\n```bash\ngit clone https://github.com/rodneylab/sveltekit-content-security-policy.git\ncd sveltekit-content-security-policy\npnpm install # or npm install\npnpm dev\n```\n\n## Building\n\n```bash\npnpm build\n```\n\n\u003e You can preview the built app with `pnpm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.\n\nFeel free to jump into the [Rodney Lab matrix chat room](https://matrix.to/#/%23rodney:matrix.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodneylab%2Fsveltekit-content-security-policy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodneylab%2Fsveltekit-content-security-policy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodneylab%2Fsveltekit-content-security-policy/lists"}