Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Forwarded-For header should not be added #10

Open
julien4215 opened this issue Dec 14, 2023 · 0 comments
Open

X-Forwarded-For header should not be added #10

julien4215 opened this issue Dec 14, 2023 · 0 comments

Comments

@julien4215
Copy link

julien4215 commented Dec 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant