mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
🏗 Removed www subdomain from default newsletter/support address
refs https://github.com/TryGhost/Team/issues/397 The default newsletter/support email address for a site is currently setup as noreply@DOMAIN , which means for a custom domain setup with www the email address becomes noreply@www.somesite.com which is not the expected behavior normally. This removes the `www` subdomain if present for those email addresses, but doesn't change any other subdomain
This commit is contained in:
parent
82bb466316
commit
2e81aa17fb
1 changed files with 6 additions and 2 deletions
|
@ -31,8 +31,12 @@ class MembersConfigProvider {
|
|||
* @private
|
||||
*/
|
||||
_getDomain() {
|
||||
const domain = this._urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
|
||||
return domain && domain[1];
|
||||
const url = this._urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
|
||||
const domain = (url && url[1]) || '';
|
||||
domain.startsWith('www.') {
|
||||
return domain.replace(/^(www)\.(?=[^/]*\..{2,5})/, '');
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
|
||||
getEmailFromAddress() {
|
||||
|
|
Loading…
Add table
Reference in a new issue