0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Fixed incorrect subdomain check

refs 2e81aa17fb

Incomplete push in the last commit with missing conditional check :/
This commit is contained in:
Rish 2021-03-24 23:33:49 +05:30
parent 2e81aa17fb
commit eb2b98a087

View file

@ -33,7 +33,7 @@ class MembersConfigProvider {
_getDomain() {
const url = this._urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
const domain = (url && url[1]) || '';
domain.startsWith('www.') {
if (domain.startsWith('www.')) {
return domain.replace(/^(www)\.(?=[^/]*\..{2,5})/, '');
}
return domain;