MCPcopy
hub / github.com/freshframework/fresh / defaultOptionsHandler

Function defaultOptionsHandler

packages/fresh/src/app.ts:41–49  ·  view source on GitHub ↗
(methods: string[])

Source from the content-addressed store, hash-verified

39};
40
41const defaultOptionsHandler = (methods: string[]): () => Promise<Response> => {
42 return () =>
43 Promise.resolve(
44 new Response(null, {
45 status: 204,
46 headers: { Allow: methods.join(", ") },
47 }),
48 );
49};
50// deno-lint-ignore require-await
51const DEFAULT_ERROR_HANDLER = async <State>(ctx: Context<State>) => {
52 const { error } = ctx;

Callers 1

handlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected