Added PornPros satellite sites.

This commit is contained in:
2020-01-15 01:01:16 +01:00
parent 6d5dde774f
commit 5dda81535d
49 changed files with 143 additions and 12 deletions

View File

@@ -60,7 +60,7 @@ function destructConfigNetworks(networks) {
}
async function findSiteByUrl(url) {
const { hostname } = new URL(url);
const { hostname, origin } = new URL(url);
const domain = hostname.replace(/www.|tour./, '');
const sites = await knex('sites')
@@ -70,6 +70,7 @@ async function findSiteByUrl(url) {
'networks.name as network_name', 'networks.slug as network_slug', 'networks.url as network_url', 'networks.description as network_description', 'networks.parameters as network_parameters',
)
.where('sites.url', 'like', `${domain}`)
.orWhere('sites.url', 'like', `${origin}`)
.orWhere('sites.url', url);
if (sites.length > 0) {