Skip to content

Commit

Permalink
fix: logging for aws lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Aug 23, 2024
1 parent 713705a commit 14144d8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/aws/with-emailpassword/frontend/src/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Session from "supertokens-auth-react/recipe/session";
export function getApiDomain() {
// const apiPort = process.env.REACT_APP_API_PORT || 3001;
// const apiUrl = process.env.REACT_APP_API_URL || `http://localhost:${apiPort}`;
return "https://0ez3j5libc.execute-api.ap-south-1.amazonaws.com";
return "https://zcbgp7k8ti.execute-api.ap-south-1.amazonaws.com/prod";
}

export function getWebsiteDomain() {
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/awsLambda/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class AWSRequest extends request_1.BaseRequest {
let path = this.event.path;
let queryParams = this.event.queryStringParameters;
if (path === undefined) {
console.log(this.event);
path = this.event.requestContext.http.path;
let stage = this.event.requestContext.stage;
if (stage !== undefined && path.startsWith(`/${stage}`)) {
Expand Down
1 change: 1 addition & 0 deletions lib/ts/framework/awsLambda/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export class AWSRequest extends BaseRequest {
let path = (this.event as APIGatewayProxyEvent).path;
let queryParams = (this.event as APIGatewayProxyEvent).queryStringParameters as { [key: string]: string };
if (path === undefined) {
console.log(this.event);
path = (this.event as APIGatewayProxyEventV2).requestContext.http.path;
let stage = (this.event as APIGatewayProxyEventV2).requestContext.stage;
if (stage !== undefined && path.startsWith(`/${stage}`)) {
Expand Down

0 comments on commit 14144d8

Please sign in to comment.