aboutsummaryrefslogtreecommitdiffstats
path: root/routes/rates.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-03 09:08:18 -0800
committerAdam Soltys <[email protected]>2026-03-03 09:08:18 -0800
commit94569349ea73685ae531ca0da91bfc3ff9d40c58 (patch)
treeab1595df08bc34a1cfe89867669e87c57ce238ca /routes/rates.ts
parentc7300714c57652e68fcadcdbcfcce3df8dd7d37b (diff)
downloadcoinos-server-94569349ea73685ae531ca0da91bfc3ff9d40c58.tar.gz
coinos-server-94569349ea73685ae531ca0da91bfc3ff9d40c58.zip
request tuning
Diffstat (limited to 'routes/rates.ts')
-rw-r--r--routes/rates.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/routes/rates.ts b/routes/rates.ts
index d4426a6e..6e14da82 100644
--- a/routes/rates.ts
+++ b/routes/rates.ts
@@ -4,15 +4,18 @@ import { rate } from "$lib/rates";
export default {
async fx(c) {
const { fx } = await g("fx");
+ c.header("Cache-Control", "public, max-age=300");
return c.json({ fx });
},
async last(c) {
+ c.header("Cache-Control", "public, max-age=30");
return c.json(rate || (await g("rate")));
},
async index(c) {
const { date, fx, ...rates } = await g("rates");
+ c.header("Cache-Control", "public, max-age=30");
return c.json(rates);
},
};