The Plausible tracker sends events via fetch with Content-Type: text/plain and a JSON body. Laravel doesn't parse that, so every real event failed validation (302 redirect) and never reached Plausible. The tests used postJson(), which hid the bug.
Changes
PlausibleEventRequest: decodes the raw body when the request isn't JSON
Invalid non-JSON requests get a 400 instead of a redirect (JSON requests still get 422)
The event controller trims a trailing slash from the domain, uses a 5s timeout and responds with 502 when Plausible is unreachable
New tests for text/plain, invalid body, trailing slash and connection failures
The Plausible tracker sends events via `fetch` with `Content-Type: text/plain` and a JSON body. Laravel doesn't parse that, so every real event failed validation (302 redirect) and never reached Plausible. The tests used `postJson()`, which hid the bug.
## Changes
- `PlausibleEventRequest`: decodes the raw body when the request isn't JSON
- Invalid non-JSON requests get a 400 instead of a redirect (JSON requests still get 422)
- The event controller trims a trailing slash from the domain, uses a 5s timeout and responds with 502 when Plausible is unreachable
- New tests for text/plain, invalid body, trailing slash and connection failures
Compared against https://plausible.io/docs/proxy/guides/laravel – everything else already matches.
The Plausible tracker posts its JSON payload with Content-Type text/plain,
which Laravel does not parse, so every real event failed validation and
was redirected instead of being forwarded.
- Decode the raw body when the request is not JSON
- Respond with 400 instead of a redirect on invalid non-JSON requests
- Trim trailing slash from the configured domain when forwarding events
- Add a 5s timeout and respond with 502 when Plausible is unreachable
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The Plausible tracker sends events via
fetchwithContent-Type: text/plainand a JSON body. Laravel doesn't parse that, so every real event failed validation (302 redirect) and never reached Plausible. The tests usedpostJson(), which hid the bug.Changes
PlausibleEventRequest: decodes the raw body when the request isn't JSONCompared against https://plausible.io/docs/proxy/guides/laravel – everything else already matches.