Skip to content

Commit d798661

Browse files
committed
changed proxy in api gateway
1 parent 3237d9b commit d798661

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

api-gateway/src/routes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const createMultipartProxy = (serviceUrl: string) => {
2323
const createRegularProxy = (serviceUrl: string) => {
2424
return proxy(serviceUrl, {
2525
proxyReqPathResolver(req) {
26-
console.log(`Regular proxy: ${serviceUrl}${req.url}`);
27-
return req.url;
26+
const resolvedPath = req.url;
27+
console.log(`[PROXY] Forwarding ${req.method} ${req.originalUrl}${serviceUrl}${resolvedPath}`);
28+
return resolvedPath;
2829
},
2930
userResDecorator: function(proxyRes, proxyResData, userReq, userRes) {
3031
console.log(`Response from ${serviceUrl}${userReq.url}: Status ${proxyRes.statusCode}`);

0 commit comments

Comments
 (0)