This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

niri / src / cors.ts
403 B 13 lines
1import type { FastifyReply } from "fastify" 2 3export const CORS_HEADERS = { 4 "access-control-allow-origin": "*", 5 "access-control-allow-methods": "GET,POST,OPTIONS", 6 "access-control-allow-headers": "content-type,authorization", 7} as const 8 9export function applyCorsHeaders(reply: FastifyReply): void { 10 for (const [name, value] of Object.entries(CORS_HEADERS)) { 11 reply.header(name, value) 12 } 13}