Add Cloudflare API controls
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export function jsonResponse(
|
||||
body: unknown,
|
||||
status: number,
|
||||
headers: Record<string, string> = {},
|
||||
): Response {
|
||||
return new Response(JSON.stringify(body), {
|
||||
status,
|
||||
headers: {
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
...headers,
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user