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

feat(framework): add fetchOptions parameter to Client for custom fetch configuration #7433

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

wh5938316
Copy link

What changed? Why was the change needed?

As a developer based in China, I often face issues with accessing Novu’s services due to the Great Firewall (GFW). This leads to timeouts when my local services attempt to send requests to Novu’s servers. Adding fetchOptions would allow me to use tools like https-proxy-agent to bypass these restrictions by routing requests through a proxy server.

close #7432

Copy link

netlify bot commented Jan 5, 2025

👷 Deploy request for dev-web-novu pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 772a66e

Copy link

netlify bot commented Jan 5, 2025

👷 Deploy request for dashboard-v2-novu-staging pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 772a66e

* Additional fetch options to be passed to the fetch API.
* This can be used to set custom agent, headers, etc.
*/
fetchOptions?: Record<string, any>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To provide better DX, I suggest typing this as a RequestInit.

@SokratisVidros
Copy link
Contributor

Thanks for the contribution! Let's address the latest comment before merging.

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