{"id":25387079,"url":"https://github.com/abiosoft/caddy-inspect","last_synced_at":"2025-04-25T12:52:34.875Z","repository":{"id":273910627,"uuid":"921283130","full_name":"abiosoft/caddy-inspect","owner":"abiosoft","description":"HTTP Request Inspector for Caddy web server","archived":false,"fork":false,"pushed_at":"2025-02-14T10:39:57.000Z","size":2569,"stargazers_count":23,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T11:34:58.990Z","etag":null,"topics":["caddy","debugger","inspector"],"latest_commit_sha":null,"homepage":"","language":"Go","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/abiosoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"abiosoft","custom":["https://buymeacoffee.com/abiosoft"]}},"created_at":"2025-01-23T17:12:15.000Z","updated_at":"2025-02-14T10:40:01.000Z","dependencies_parsed_at":"2025-02-07T08:32:13.406Z","dependency_job_id":null,"html_url":"https://github.com/abiosoft/caddy-inspect","commit_stats":null,"previous_names":["abiosoft/caddy-inspect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fcaddy-inspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fcaddy-inspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fcaddy-inspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fcaddy-inspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abiosoft","download_url":"https://codeload.github.com/abiosoft/caddy-inspect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250822382,"owners_count":21492902,"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":["caddy","debugger","inspector"],"created_at":"2025-02-15T11:02:12.833Z","updated_at":"2025-04-25T12:52:34.865Z","avatar_url":"https://github.com/abiosoft.png","language":"Go","funding_links":["https://github.com/sponsors/abiosoft","https://buymeacoffee.com/abiosoft","https://www.buymeacoffee.com/abiosoft"],"categories":["Go"],"sub_categories":[],"readme":"# caddy-inspect\n\nThe Inspect plugin provides an easy way to inspect HTTP requests in Caddy.\n\nThe Caddyfile is already easy to write. The Inspect plugin takes it a step further by allowing you to place breakpoints in the Caddyfile and ascertain the behaviour of Caddy.\n\n![Screenshot](screenshot.png)\n\n## Features\n\n- Insert a breakpoint anywhere in the Caddyfile with the `inspect` keyword.\n- Inspecting HTTP and Caddy contexts\n- Intercepting and terminating HTTP requests and responses\n- Works in the browser, zero setup required.\n\n## Installation\n\n```\nxcaddy build --with github.com/abiosoft/caddy-inspect\n```\n\n## Getting Started\n\n### Specify breakpoints in the Caddyfile\n\nPlace the `inspect` keyword anywhere an [HTTP directive](https://caddyserver.com/docs/caddyfile/directives#caddyfile-directives) is supported in the Caddyfile. The keyword can be specified multiple times.\n\n```caddy\n:8080\n\nroute /api {\n    rewrite /api/* /api/v1{uri}\n    inspect\n    ...\n}\n```\n\n### Start Caddy\n\nCaddy can be started with the `--watch` flag to autoreload the Caddyfile on each modification.\n\n```sh\ncaddy run --watch\n```\n\n### Access the Inspect console\n\nOpen http://localhost:2020 in the browser to access the console.\n\n\u003e [!NOTE]\n\u003e Another port would be assigned if `2020` is not available.\n\u003e The URL can be confirmed in the Caddy logs.\n\n### Enjoy\n\nAny HTTP request(s) made to a route containing the `inspect` keyword would pause the request and activate the console.\n\n## Caveats\n\n\u003e [!CAUTION]\n\u003e This plugin is intended for development purposes only, sensitive information may be exposed if used in a production environment.\n\n- The plugin is tailored towards Caddyfile config. However, JSON config can be used with limited experience.\n- Due to the in-built [order of directives](https://caddyserver.com/docs/caddyfile/directives#directive-order) in Caddy, `inspect` is more predictable in a `route` block. Otherwise, it is ordered after the `encode` directive.\n- The information displayed are read-only and cannot be modified.\n- HTTP request and response bodies cannot be inspected. It is a deliberate limitation until there is a strong argument in favour.\n- The plugin stemmed from a personal use-case. Feedbacks would be appreciated to accommodate more use-cases.\n\n## Attribution\n\nThe Caddy logo is a trademark of Caddy Web Server.\n\n## License\n\nMIT\n\n## Sponsoring\n\nYou can support the author by donating on [Github Sponsors](https://github.com/sponsors/abiosoft) or [Buy me a coffee](https://www.buymeacoffee.com/abiosoft).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fcaddy-inspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabiosoft%2Fcaddy-inspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fcaddy-inspect/lists"}