Skip to content

Commit 2fa099b

Browse files
committed
Format
1 parent 3651e19 commit 2fa099b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cors-proxy/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ type Bindings = {
88

99
const app = new Hono<{ Bindings: Bindings }>();
1010

11-
function getCorsHeaders(c: { env: Bindings; req: { header: (name: string) => string | undefined } }) {
11+
function getCorsHeaders(c: {
12+
env: Bindings;
13+
req: { header: (name: string) => string | undefined };
14+
}) {
1215
const allowed = c.env.ALLOWED_ORIGIN;
1316
const origin = c.req.header('origin');
1417
// When ALLOWED_ORIGIN is set, only reflect it if the request origin matches.
@@ -90,7 +93,6 @@ function isValidCacheEntry(data: unknown): data is {
9093
if (typeof obj.result !== 'object' || obj.result === null) return false;
9194
const result = obj.result as Record<string, unknown>;
9295
return Array.isArray(result.days);
93-
9496
}
9597

9698
// --- Cache routes (only active when R2 binding RESULTS is present) ---

0 commit comments

Comments
 (0)