{"id":39857241,"url":"https://github.com/dmt-software/anti-xss-middleware","last_synced_at":"2026-01-18T13:53:27.803Z","repository":{"id":56933881,"uuid":"478573437","full_name":"dmt-software/anti-xss-middleware","owner":"dmt-software","description":"anti-xss middleware","archived":false,"fork":false,"pushed_at":"2024-08-30T07:47:06.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-17T22:53:17.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmt-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-06T13:31:17.000Z","updated_at":"2025-09-02T02:25:55.000Z","dependencies_parsed_at":"2024-08-29T15:50:14.217Z","dependency_job_id":null,"html_url":"https://github.com/dmt-software/anti-xss-middleware","commit_stats":{"total_commits":9,"total_committers":3,"mean_commits":3.0,"dds":0.5555555555555556,"last_synced_commit":"2bb67c90b6c5cb6896c4bbdfa61273040d52cf7d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dmt-software/anti-xss-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmt-software%2Fanti-xss-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmt-software%2Fanti-xss-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmt-software%2Fanti-xss-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmt-software%2Fanti-xss-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmt-software","download_url":"https://codeload.github.com/dmt-software/anti-xss-middleware/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmt-software%2Fanti-xss-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-18T13:53:27.665Z","updated_at":"2026-01-18T13:53:27.781Z","avatar_url":"https://github.com/dmt-software.png","language":"PHP","readme":"# Anti XSS Middleware\n\nThis middleware implements the PSR-15 MiddlewareInterface and can be helpful to prevent XSS attacks. \n\n## Installation\n\n```bash\ncomposer require dmt-software/anti-xss-middleware\n```\n\n## Usage\n\n```php\nuse DMT\\Http\\AntiXss\\Middleware\\AntiXssMiddleware;\nuse Psr\\Http\\Message\\ResponseFactoryInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Psr\\Http\\Server\\RequestHandlerInterface;\n\n/** @var ResponseFactoryInterface $responseFactory */\n$antiXssMiddleware = new AntiXssMiddleware($responseFactory);\n\n/** @var ServerRequestInterface $request */\n/** @var RequestHandlerInterface $handler */\n$response = $antiXssMiddleware-\u003eprocess($request, $handler);\n\nif ($response-\u003egetStatusCode() === 400) {\n    // cross site scripting detected\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmt-software%2Fanti-xss-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmt-software%2Fanti-xss-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmt-software%2Fanti-xss-middleware/lists"}