Skip to content

Commit a807d7a

Browse files
committed
handle non-relative urls when extracting request data
1 parent 8b338c5 commit a807d7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node/src/requestdata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export function extractRequestData(
169169
// koa, nextjs: req.url
170170
const originalUrl = req.originalUrl || req.url || '';
171171
// absolute url
172-
const absoluteUrl = `${protocol}://${host}${originalUrl}`;
172+
const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`;
173173
include.forEach(key => {
174174
switch (key) {
175175
case 'headers': {

0 commit comments

Comments
 (0)