Skip to content

Commit 1bd7b18

Browse files
committed
chore: fix regex as per codeQL rec
1 parent bdcf71f commit 1bd7b18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

handwritten/pubsub/src/pubsub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ export class PubSub {
806806

807807
// Parse the URL into a hostname and port, if possible.
808808
const leadingProtocol = new RegExp('^https?://');
809-
const trailingSlashes = new RegExp('/*$');
809+
const trailingSlashes = new RegExp('(?<!/)/+$');
810810
const baseUrlParts = apiEndpoint!
811811
.replace(leadingProtocol, '')
812812
.replace(trailingSlashes, '')

0 commit comments

Comments
 (0)