Skip to content

Use Axios client for EventSource #440

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

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

aaronlehmann
Copy link
Contributor

This allows client TLS certificates to be used for event monitoring. Upgrade to a newer eventsource package that supports a custom fetch function, and provide a custom fetch function which wraps Axios.

@matifali matifali requested a review from bcpeinhardt February 28, 2025 11:52
src/api.ts Outdated
@@ -224,6 +280,7 @@ export async function waitForBuild(
| undefined,
},
followRedirects: true,
agent: restClient.getAxiosInstance().defaults.httpAgent,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a similar issue with the WebSocket request not using TLS settings

@aaronlehmann aaronlehmann force-pushed the event-source-axios-3 branch 2 times, most recently from 12a71ee to 56ce33c Compare February 28, 2025 16:12
@aaronlehmann aaronlehmann force-pushed the event-source-axios-3 branch 2 times, most recently from 5ede407 to 2fe5804 Compare February 28, 2025 21:02
This allows client TLS certificates to be used for event monitoring.
Upgrade to a newer `eventsource` package that supports a custom `fetch`
function, and provide a custom `fetch` function which wraps Axios.
@aaronlehmann aaronlehmann force-pushed the event-source-axios-3 branch 2 times, most recently from 0fff882 to 7ef954e Compare February 28, 2025 22:13
@bcpeinhardt bcpeinhardt merged commit bbcd5fd into coder:main Mar 3, 2025
2 checks passed
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 this pull request may close these issues.

2 participants