mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed incorrect subdomain check
refs 2e81aa17fb
Incomplete push in the last commit with missing conditional check :/
This commit is contained in:
parent
2e81aa17fb
commit
eb2b98a087
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ class MembersConfigProvider {
|
||||||
_getDomain() {
|
_getDomain() {
|
||||||
const url = this._urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
|
const url = this._urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
|
||||||
const domain = (url && url[1]) || '';
|
const domain = (url && url[1]) || '';
|
||||||
domain.startsWith('www.') {
|
if (domain.startsWith('www.')) {
|
||||||
return domain.replace(/^(www)\.(?=[^/]*\..{2,5})/, '');
|
return domain.replace(/^(www)\.(?=[^/]*\..{2,5})/, '');
|
||||||
}
|
}
|
||||||
return domain;
|
return domain;
|
||||||
|
|
Loading…
Add table
Reference in a new issue