fix(earn): load eligible yields by token to avoid WAF 403 blocks - #571
Merged
Merged
Conversation
Fetch token-eligible yields on the initial earn page by passing the selected token to the Yield API instead of serializing dozens of yield IDs into the query string. This prevents exceeding AWS WAF's 2KB query string limit (SizeRestrictions_QUERYSTRING). Also reduce the fallback yield IDs chunk size from 100 to 20 for paths that must still fetch yields by explicit identifiers.
|
Philippoes
approved these changes
Sep 16, 2026
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
dnehl
approved these changes
Sep 16, 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.
Added
tokeninYieldDirectoryKey,YieldDirectoryRequest, andtoYieldDirectoryParams.YIELD_IDS_CHUNK_SIZE = 20constant in pagination helpers to bound fallback query sizes.Changed
readYieldCatalogon the initial earn page to query the Yield API using the selected token (addressorsymbol) instead of serializing allavailableYieldsinto the query string, eliminating URL bloat that triggered AWS WAFSizeRestrictions_QUERYSTRING403 Forbidden blocks.yieldIdschunk size from 100 to 20 for non-token loading paths (e.g. positions, multi-yields) to keep query strings safely under 2,048 bytes.