Match any port in dupe check (#297)

Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
ekzyis 2023-06-01 02:49:28 +02:00 committed by GitHub
parent 88372b6a9e
commit ace2a4df3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ export default {
},
dupes: async (parent, { url }, { me, models }) => {
const urlObj = new URL(ensureProtocol(url))
let uri = urlObj.hostname + urlObj.pathname
let uri = urlObj.hostname + '(:[0-9]+)?' + urlObj.pathname
uri = uri.endsWith('/') ? uri.slice(0, -1) : uri
const parseResult = parse(urlObj.hostname)