Skip to content

Commit

Permalink
Fix response headers
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgef committed Feb 17, 2024
1 parent 0c32c69 commit b9a6489
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/Response/Response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ export const res_500 = (input?: any, options = null) => res(input ? parseInput(i
export const res = (input: any, options = {} as any) => {
const data = parseInput(input);
return new Response(JSON.stringify({ ...data }, undefined, apiker.debug ? 4 : undefined), {
headers: apiker.responseHeaders,
...(Number.isInteger(options) ? { status: options } : options),
headers: {
...apiker.responseHeaders,
...(options.headers || {})
},
});
};

Expand Down

0 comments on commit b9a6489

Please sign in to comment.