{"id":20410011,"url":"https://github.com/vdlp/oc-csrf-plugin","last_synced_at":"2025-04-12T15:53:16.644Z","repository":{"id":47291355,"uuid":"197760665","full_name":"vdlp/oc-csrf-plugin","owner":"vdlp","description":"Adds CSRF protection to October CMS frontend.","archived":false,"fork":false,"pushed_at":"2025-03-03T11:02:52.000Z","size":53,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T10:21:30.284Z","etag":null,"topics":["csrf","october-cms","october-plugin","octobercms","php","security"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdlp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-19T11:24:02.000Z","updated_at":"2025-03-03T11:02:35.000Z","dependencies_parsed_at":"2023-02-09T02:55:11.570Z","dependency_job_id":null,"html_url":"https://github.com/vdlp/oc-csrf-plugin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdlp%2Foc-csrf-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdlp%2Foc-csrf-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdlp%2Foc-csrf-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdlp%2Foc-csrf-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdlp","download_url":"https://codeload.github.com/vdlp/oc-csrf-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248592140,"owners_count":21130190,"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":["csrf","october-cms","october-plugin","octobercms","php","security"],"created_at":"2024-11-15T05:44:36.644Z","updated_at":"2025-04-12T15:53:16.622Z","avatar_url":"https://github.com/vdlp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vdlp.Csrf\n\nAdds CSRF protection.\n\n## Requirements\n\n* PHP 8.0.2 or higher\n* October CMS 2.0 or higher\n\n## Installation\n\n```\ncomposer require vdlp/oc-csrf-plugin\n```\n\n## Configuration\n\nAdd the plugin configuration to your config folder:\n\n```\nphp artisan vendor:publish --provider=\"Vdlp\\Csrf\\ServiceProviders\\CsrfServiceProvider\" --tag=\"vdlp-csrf-config\"\n```\n\nAdd the CSRF token to the `\u003chead\u003e` section:\n\n```\n\u003cmeta name=\"csrf-token\" content=\"{{ csrf_token() }}\"\u003e\n```\n\nAdd the CSRF token to the AJAX requests:\n\n```\n\u003cscript type=\"text/javascript\"\u003e\n$.ajaxSetup({\n    headers: {\n        'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n    }\n});\n\u003c/script\u003e\n```\n\n## Questions? Need help?\n\nIf you have any question about how to use this plugin, please don't hesitate to contact us at octobercms@vdlp.nl. We're happy to help you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdlp%2Foc-csrf-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdlp%2Foc-csrf-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdlp%2Foc-csrf-plugin/lists"}