Closed riley-kohler closed 3 months ago
Thanks a ton for the contribution!!
I figured this might lead to some conflicts 😅 I’ll be happy to resolve them for you
Hey all, gonna be taking care of this in the next day or so! I'm going to remove scripts
from the docker build step since the forwarder shouldn't be needed there.
@sutterj will be taking point on this 👑
@sutterj saw your comment in my email but couldn't find it to reply directly. I switched the mjs to ts because I needed to import a ts file into both that mjs file and the rest of the ts code base and thought it would be necessary for compatibility. If it's not that's fine. I did notice some type issues when converting but it seems like they rooted back to incorrect types from the libraries that are being used and switching to tsx (which I needed to get it running at all) ignored the type issues for now.
I'm looking into converting the project/tests to ESM to see if I can't solve this issue more elegantly, but I was able to get it to work by making a second version of the proxy as mjs and converting the webhooks relay back to mjs. Not the "ideal" solution, but it solves the types issues and allows us to go back to ts-node.
@riley-kohler Can you pull the latest here and test it on your network?
Just tested on our network and everything is still working
Pull Request
Proposed Changes
This PR adds proxy support to ICF by configuring fetch/undici with a global dispatcher the uses proxy envs and older request libraries with a global agent that uses the envs as well.
This solution works but has a couple of remaining issues.
I wanted to put up this PR to get the "working" proxy support out there but am open to any suggestions or changes needed before merging.
Readiness Checklist
Author/Contributor
npm run lint
and fix any linting issues that have been introducednpm run test
and run testsReviewer
bug
,documentation
,enhancement
,infrastructure
,maintenance
, orbreaking