Skip to content

Conversation

@hackertron
Copy link

Summary

  • /updatedProtocol now respects restrictResponseSize and trims heavy fields for very large responses, improving latency and payload size.
  • Legacy routes (/protocol, /treasury, /entity) remain explicitly unrestricted to avoid breaking changes.

Changes

  • Remove global override forcing restrictResponseSize=false (defi/src/api2/routes/index.ts:276).
  • Set restrictResponseSize=false explicitly for legacy routes (lines 45, 48, 49).
  • Leverage existing limiter in craftProtocolV2.ts (no logic changes).

Behavior

  • /updatedProtocol default is restricted; users can opt out via ?restrictResponseSize=false.
  • Legacy routes unchanged (full payloads).

…gacy routes unrestricted; remove global override hack. Refs DefiLlama#10323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant