bostrot / bostrot/flutter_plausible_analytics

X-Forwarded-For header should not be added

Open
#10 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

The `X-Forwarded-For` is set to `127.0.0.1` by the plugin.

This is no need to add the `X-Forwarded-For` header as it is optional according to the event api documentation (https://plausible.io/docs/events-api#request-headers).

It also create a CORS error when a POST request is sent to the event api from a flutter web app. The navigator will first send a preflight request and plausible will not respond with `X-Forwarded-For` in `Access-Control-Allow-Headers` resulting in a CORS error. Plausible not adding `X-Forwarded-For` to `Access-Control-Allow-Headers` makes sense as the `X-Forwarded-For` is set by the reverse proxy and should not be set on client side.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.