Skip to content

Commit f9c28f8

Browse files
committed
chore: replace a regex with a simple string replace
1 parent c918015 commit f9c28f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/http-incoming.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const urlFromRequest = (request) => {
77
const protocol = request?.protocol || 'http';
88
const host = request?.headers?.host || 'localhost';
99
const url = request?.url || '';
10-
return new URL(url, `${protocol.replace(/:/, '')}://${host}`);
10+
return new URL(url, `${protocol.replace(':', '')}://${host}`);
1111
};
1212

1313
/**

0 commit comments

Comments
 (0)