feat(nextjs): allow auth header override (#12)
* feat(nextjs): allow auth header override * chore: bump nextjs proxy version to 0.2.3
This commit is contained in:
parent
a2166cd113
commit
58520c7553
@ -11,6 +11,7 @@ export class ApiError extends Error {
|
||||
public readonly body?: any;
|
||||
constructor({ message, status, body }: ApiErrorArgs) {
|
||||
super(message);
|
||||
this.name = 'ApiError';
|
||||
this.status = status;
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@fal-ai/serverless-nextjs",
|
||||
"description": "The fal-serverless Next.js integration",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@ -83,7 +83,7 @@ export const handler: NextApiHandler = async (request, response) => {
|
||||
method: request.method,
|
||||
headers: {
|
||||
...headers,
|
||||
authorization: `Key ${falKey}`,
|
||||
authorization: getHeader(request, 'authorization') ?? `Key ${falKey}`,
|
||||
accept: 'application/json',
|
||||
'content-type': 'application/json',
|
||||
'x-fal-client-proxy': '@fal-ai/serverless-nextjs',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user