diff --git a/.env.local.sample b/.env.local.sample index a00675dc..60aa4fc2 100644 --- a/.env.local.sample +++ b/.env.local.sample @@ -1,5 +1,5 @@ NODE_ENV=development -PHP_PROXY_TARGET=http://host.docker.internal:8080/api +PHP_PROXY_TARGET=http://host.docker.internal:8080 USER_SERVICE_PROXY_TARGET=http://host.docker.internal:4010 DB_HOST=localhost diff --git a/apps/api-gateway/lambda/local-proxy/index.ts b/apps/api-gateway/lambda/local-proxy/index.ts index b20e3fe1..876a6009 100644 --- a/apps/api-gateway/lambda/local-proxy/index.ts +++ b/apps/api-gateway/lambda/local-proxy/index.ts @@ -2,7 +2,7 @@ import {APIGatewayProxyEventV2, APIGatewayProxyResultV2} from 'aws-lambda' export async function main(event: APIGatewayProxyEventV2): Promise { const query = event.rawQueryString === '' ? '' : `?${event.rawQueryString}`; - const url = `${process.env.PROXY_TARGET}/${event.pathParameters!.proxy}${query}`; + const url = `${process.env.PROXY_TARGET}${event.rawPath}${query}`; const requestHeaders = new Headers(); for (const header in event.headers) { requestHeaders.append(header, event.headers[header]!); @@ -18,15 +18,14 @@ export async function main(event: APIGatewayProxyEventV2): Promise UnauthorizedException, diff --git a/apps/user-service/src/main.ts b/apps/user-service/src/main.ts index 7a5279f8..9e5caac9 100644 --- a/apps/user-service/src/main.ts +++ b/apps/user-service/src/main.ts @@ -15,7 +15,7 @@ async function bootstrap() { .addTag('user-service') .build(); const document = SwaggerModule.createDocument(app, config); - SwaggerModule.setup('api', app, document); + SwaggerModule.setup('user-service/documentation/api', app, document); app.useGlobalPipes(new ValidationPipe()); app.useGlobalInterceptors(new TransformInterceptor());