From 693c07914e23c0e690af86c750215b856367afc6 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sat, 10 Feb 2018 07:37:43 -0800 Subject: [PATCH] Run second lets encrypt update later to try to fix missing www CNAME issues --- app/settings.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/settings.rb b/app/settings.rb index 83178d5c..9474d6e0 100644 --- a/app/settings.rb +++ b/app/settings.rb @@ -138,7 +138,6 @@ post '/settings/:username/custom_domain' do if params[:domain] =~ /^www\..+$/i flash[:error] = 'Cannot begin with www - please only enter the domain name.' redirect "/settings/#{@site.username}/#custom_domain" - end begin @@ -160,6 +159,8 @@ post '/settings/:username/custom_domain' do if @site.domain != original_domain LetsEncryptWorker.perform_async @site.id + # Sometimes the www record isn't ready for some reason, so try a delay to fix that. + LetsEncryptWorker.perform_in 40.minutes, @site.id end flash[:success] = 'The domain has been successfully updated! Make sure your configuration with the domain registrar is correct. It could take a while for the changes to take effect (15-40 minutes), please be patient.'