code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Expose configuration options for Axios

Open edisonchee opened this issue 1 year ago • 1 comments

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.

edisonchee avatar Sep 24 '24 09:09 edisonchee

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.

tomduncalf-figma avatar Sep 24 '24 13:09 tomduncalf-figma

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.

origami-z avatar Oct 17 '24 14:10 origami-z

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!

tomduncalf-figma avatar Oct 22 '24 10:10 tomduncalf-figma

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

ptomas-figma avatar Oct 23 '24 17:10 ptomas-figma

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

edisonchee avatar Oct 30 '24 03:10 edisonchee

Glad it helped!

ptomas-figma avatar Oct 30 '24 10:10 ptomas-figma