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;
|
public readonly body?: any;
|
||||||
constructor({ message, status, body }: ApiErrorArgs) {
|
constructor({ message, status, body }: ApiErrorArgs) {
|
||||||
super(message);
|
super(message);
|
||||||
|
this.name = 'ApiError';
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@fal-ai/serverless-nextjs",
|
"name": "@fal-ai/serverless-nextjs",
|
||||||
"description": "The fal-serverless Next.js integration",
|
"description": "The fal-serverless Next.js integration",
|
||||||
"version": "0.2.2",
|
"version": "0.2.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -83,7 +83,7 @@ export const handler: NextApiHandler = async (request, response) => {
|
|||||||
method: request.method,
|
method: request.method,
|
||||||
headers: {
|
headers: {
|
||||||
...headers,
|
...headers,
|
||||||
authorization: `Key ${falKey}`,
|
authorization: getHeader(request, 'authorization') ?? `Key ${falKey}`,
|
||||||
accept: 'application/json',
|
accept: 'application/json',
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'x-fal-client-proxy': '@fal-ai/serverless-nextjs',
|
'x-fal-client-proxy': '@fal-ai/serverless-nextjs',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user