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

Make HTTP headers configurable #392

Open
livthomas opened this issue Mar 11, 2022 · 0 comments
Open

Make HTTP headers configurable #392

livthomas opened this issue Mar 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@livthomas
Copy link

We want to use our backend as a proxy to Segment API in order to bypass ad-blockers. We have CSRF protection in place so all requests to our endpoints need to contain X-CSRF-TOKEN header. But @segment/analytics-next library doesn't enable us to set custom HTTP headers.

It looks like headers are hardcoded in fetch-dispatcher and it's been like in a predecessor of this library (see segmentio/analytics.js-integrations#560).

Can you add a new configuration property which will allow us to append additional HTTP headers? Other people are asking for it as well, see #312 (comment).

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

No branches or pull requests

2 participants