mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-28 10:53:13 +01:00
As reported in #2670, if a URL has a trailing slash and also contains path parameters then the original logic had a bug that would drop the trailing slash. This implements the fix proposed by @ThenTech.
This commit is contained in:
parent
8e222189bc
commit
2dd5ae400c
@ -122,7 +122,8 @@ const interpolateVars = (request, envVars = {}, runtimeVariables = {}, processEn
|
|||||||
})
|
})
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
request.url = url.origin + interpolatedUrlPath + url.search;
|
const trailingSlash = url.pathname.endsWith('/') ? '/' : '';
|
||||||
|
request.url = url.origin + interpolatedUrlPath + trailingSlash + url.search;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.proxy) {
|
if (request.proxy) {
|
||||||
|
@ -120,7 +120,8 @@ const interpolateVars = (request, envVariables = {}, runtimeVariables = {}, proc
|
|||||||
})
|
})
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
request.url = url.origin + urlPathnameInterpolatedWithPathParams + url.search;
|
const trailingSlash = url.pathname.endsWith('/') ? '/' : '';
|
||||||
|
request.url = url.origin + urlPathnameInterpolatedWithPathParams + trailingSlash + url.search;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.proxy) {
|
if (request.proxy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user