Add option for using a proxy to AtData Safe To Send API for FreshAddress Component#380
Merged
Conversation
fernanDOTdo
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new option has been added to the FreshAddress Component
proxyUrl. This accepts a URL hosting a proxy to the AtData SafeToSendAPI: https://docs.atdata.com/reference/safe-to-send that returns the same structure as that API endpoint does.This addition attempts to gracefully integrate with the current component with as few changes as possible and re-using patterns already defined by the component. When a
proxyUrloption is provided, we simply substitute the API call and response handling to 2 new functions.Differences from current implementation
Redundancies and Fallbacks
These are in place to handle:
In these cases the form is allowed to be submitted.
Testing
Related Productive task: https://app.productive.io/2650-4site-interactive-studios-inc/tasks/16274112
The page can be tested on WWF's pages using a branch I built from this branch that is configured to use their proxy:
https://protect.worldwildlife.org/page/94262/donate/1?assets=fresh-address-proxy
Testing Criteria
proxyUrl, everything works as it did before.