Skip to content

Commit

Permalink
feat(nextjs): allow auth header override (#12)
Browse files Browse the repository at this point in the history
* feat(nextjs): allow auth header override

* chore: bump nextjs proxy version to 0.2.3
  • Loading branch information
drochetti authored Oct 2, 2023
1 parent a2166cd commit 58520c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions libs/client/src/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion libs/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion libs/nextjs/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 58520c7

Please sign in to comment.