stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
642 stars 312 forks source link

Allow for handling of redirects of URL to stellar.toml #1052

Open KyleSmith19091 opened 1 month ago

KyleSmith19091 commented 1 month ago

Is your feature request related to a problem? Please describe. Experienced an issue when trying to resolve the stellar.toml for this EURC issued asset, which when this URL is accessed redirects you to a different url where the toml file is hosted. I understand this might go against the standard set by the stellar foundation, but I feel like you should be able to have a flag that can handle redirects when trying to resolve the domain. If this is not wide issue I understand if this issue is not considered

Describe the solution you'd like Add a flag to the Resolver.resolve options object to set some number of redirects which can then be passed the axios.get function.

Describe alternatives you've considered I had to write custom logic on top of the stellar Resolver.resolve function to correctly handle this case.

KyleSmith19091 commented 1 month ago

Proposed solution: https://github.com/stellar/js-stellar-sdk/pull/1053