Skip to content

Commit ffef8b3

Browse files
Updated feature flags
1 parent a6cb656 commit ffef8b3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ export default {
6060
});
6161
}
6262

63-
const featureFlags = await env.FEATURE_FLAGS.get<FeatureFlags | null>(`${userAgent.client}`, "json");
63+
const featureFlags = await env.FEATURE_FLAGS.get<FeatureFlags | null>(`${userAgent.client}`, {
64+
cacheTtl: 3600,
65+
type: "json"
66+
});
6467

6568
if(!featureFlags) {
6669
context.waitUntil(triggerAlarm(env, "User Agent Alarm", `An unrecognized user agent was detected.\n \n\`\`\`\n${userAgent}\n\`\`\`\n${request.method} ${request.url}\nRemote Address: || ${request.headers.get("CF-Connecting-IP")} ||`));

0 commit comments

Comments
 (0)