fixed medium archive links redirecting https://github.com/libredirect/libredirect/issues/527
This commit is contained in:
parent
32c4a0211e
commit
f47f9f51ea
@ -47,7 +47,7 @@ function all(service, frontend, options, config, redirects) {
|
|||||||
|
|
||||||
function regexArray(service, url, config) {
|
function regexArray(service, url, config) {
|
||||||
if (config.services[service].targets == "datajson") {
|
if (config.services[service].targets == "datajson") {
|
||||||
if (targets[service].includes(utils.protocolHost(url))) return true
|
if (targets[service].startsWith(utils.protocolHost(url))) return true
|
||||||
} else {
|
} else {
|
||||||
const targetList = config.services[service].targets
|
const targetList = config.services[service].targets
|
||||||
for (const targetString in targetList) {
|
for (const targetString in targetList) {
|
||||||
|
@ -357,7 +357,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"(?:.*\\.)*(?<!(link\\.|cdn\\-images\\-\\d+\\.))medium\\.com(\\/.*)?$",
|
"^(?:.*\\.)*(?<!(link\\.|cdn\\-images\\-\\d+\\.))medium\\.com(\\/.*)?$",
|
||||||
"^https?:\\/{2}towardsdatascience\\.com(\\/|$)",
|
"^https?:\\/{2}towardsdatascience\\.com(\\/|$)",
|
||||||
"^https?:\\/{2}uxdesign\\.cc(\\/|$)",
|
"^https?:\\/{2}uxdesign\\.cc(\\/|$)",
|
||||||
"^https?:\\/{2}uxplanet\\.org(\\/|$)",
|
"^https?:\\/{2}uxplanet\\.org(\\/|$)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user