Skip to content

About

Symfony bundle: intercept HTTP requests/responses with configurable body policies, redaction, and a secured admin UI (export & purge).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Http Log Bundle

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Symfony bundle that intercepts HTTP requests and responses, stores them with configurable body policies by content type, redaction, and a secured admin UI with filter, export (CSV/JSON), and purge/retention — with optional Messenger async persistence.

📋 Compatible with Symfony 7.4+ and 8.x (PHP 8.2+)

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly (including without kernel reset between requests — see FRANKENPHP-WORKER-AUDIT.md).

HTTP Log Entries list: filters (method, route, status, client IP, path, body type, date range, search), rows with method and status badges, duration and client IP, Export CSV / Export JSON / Purge actions, Symfony profiler toolbar
Captured traffic — filters, status badges, export and purge
HTTP log entry of a JSON POST: request metadata, redacted request headers, response headers, request and response bodies
Entry detail — redacted headers and JSON bodies
HTTP log entry with the UiKit delete confirm dialog open
Delete through the UiKit confirm dialog

What is this?

Http Log Bundle captures each HTTP exchange on kernel terminate, classifies response bodies (html, json, soap, xml, text, binary, other), applies redaction rules, and persists to Doctrine. Operators browse logs at /admin/http-log, export filtered results, and purge by retention policy.

Features

  • ✅ Kernel subscriber capture with sampling, environment filter, and sub-request toggle
  • ✅ Body policy by content type with max_body_bytes truncation
  • ✅ Redaction for headers, query parameters, and JSON paths
  • ✅ Doctrine entity HttpLogEntry with indexes for filter queries
  • ✅ Secured admin UI (filter, detail, export, purge) — REQ-UI-002
  • ✅ Admin pages on the UiKit 2.1 page contract (REQ-UI-003): list / show scaffolds, themed once through nowo_ui_kit.theme (TEMPLATES, USAGE)
  • ✅ CLI: nowo:http-log:export, nowo:http-log:purge
  • ✅ Messenger async: persist, export, purge handlers
  • ✅ Ignore routes (fnmatch) and path prefixes (admin UI excluded by default)
  • ✅ Symfony Flex recipe and FrankenPHP demo (demo/symfony8)
  • ✅ GitHub Spec Kit baseline and 100% coverage target on src/

Quick start

composer require nowo-tech/http-log-bundle
# config/packages/nowo_http_log.yaml
nowo_http_log:
    capture:
        response_body_by_type:
            json: true
    security:
        access_roles:
            - ROLE_ADMIN
php bin/console doctrine:schema:update --force
# Configure symfony/messenger when async: true (default)

Admin UI: /admin/http-log (requires ROLE_ADMIN by default).

Development

make up
make test
make -C demo/symfony8 up
make demo-smoke
make -C demo/symfony8 test-e2e          # Playwright e2e (REQ-DEMO-013)
make -C demo/symfony8 demo-screenshots  # refresh docs/images/demo/*.webp

Documentation

Additional documentation

Tests and coverage

Language Coverage (approx.) Command
PHP 100% on src/ (make test-coverage) make test-coverage
make test
make test-coverage
make test-coverage-100
make release-check

Run make test-coverage after cloning to refresh the coverage badge and CI threshold (target: 100% on src/).

License

MIT — see LICENSE.

About

Symfony bundle: intercept HTTP requests/responses with configurable body policies, redaction, and a secured admin UI (export & purge).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages