figma / code-connect

A tool for connecting your design system components in code with your design system in Figma
MIT License
960 stars 69 forks source link

Expose configuration options for Axios #171

Closed edisonchee closed 2 weeks ago

edisonchee commented 1 month ago

The current library doesn't work in some environments that need proxy authentication. For example, I need to use a custom https agent that is proxy aware to connect to Figma's REST API, but there's no way to specify it without modifying source and building the lib myself.

tomduncalf-figma commented 1 month ago

Hey @edisonchee, thanks for the report. We're definitely interested to try to solve proxy issues but it can be challenging as every setup is unique.

Would you be able to share a bit more information about what kind of configuration you'd need to do? If you have an example of the code changes you'd need to make, that would be really helpful – if you don't feel like it's something you can share publicly, you can create a ticket with Figma Support and reference this issue.

origami-z commented 1 month ago

Having similar issue behind corporate firewall, i suspect options mentioned https://github.com/axios/axios/issues/2072 is needed. In some places, only a proxy url is enough, in other places, needing username / password.

tomduncalf-figma commented 4 weeks ago

Hey @origami-z, our next release moves away from Axios in favour of using fetch directly. Axios seems to have numerous issues with proxies. In my testing, this seemed to work much better, so it will be great to get your feedback when it's released – I'll update this thread when we have released it!

ptomas-figma commented 3 weeks ago

The version mentioned above has just been released. Please let us know if it fixes the issue.

edisonchee commented 3 weeks ago

@ptomas-figma this works perfect! Thank you for pushing this change

ptomas-figma commented 2 weeks ago

Glad it helped!