Skip to content

Commit

Permalink
feat: only cache fees response if exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Nov 5, 2024
1 parent f62ad48 commit e9541b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/suggested-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ const handler = async (
responseJson,
});

response.setHeader("Cache-Control", "s-maxage=10");
// Only cache response if exclusivity
if (exclusiveRelayer !== sdk.constants.ZERO_ADDRESS) {
response.setHeader("Cache-Control", "s-maxage=10");
}
response.status(200).json(responseJson);
} catch (error) {
return handleErrorCondition("suggested-fees", response, logger, error);
Expand Down

0 comments on commit e9541b2

Please sign in to comment.