mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Merge branch 'master' of github.com:neocities/neocities
This commit is contained in:
commit
83ee577a14
2 changed files with 7 additions and 2 deletions
|
@ -225,6 +225,7 @@ post '/settings/:username/custom_domain' do
|
|||
require_login
|
||||
require_ownership_for_settings
|
||||
|
||||
original_domain = @site.domain
|
||||
@site.domain = params[:domain]
|
||||
|
||||
begin
|
||||
|
@ -243,7 +244,11 @@ post '/settings/:username/custom_domain' do
|
|||
|
||||
if @site.valid?
|
||||
@site.save_changes
|
||||
LetsEncryptWorker.perform_async @site.id
|
||||
|
||||
if @site.domain != original_domain
|
||||
LetsEncryptWorker.perform_async @site.id
|
||||
end
|
||||
|
||||
flash[:success] = 'The domain has been successfully updated.'
|
||||
redirect "/settings/#{@site.username}#custom_domain"
|
||||
else
|
||||
|
|
|
@ -11,7 +11,7 @@ class LetsEncryptWorker
|
|||
end
|
||||
|
||||
# If you need to clear scheduled jobs:
|
||||
# Sidekiq::ScheduledSet.new.select {|s| JSON.parse(s.value)['class'] == 'LetsEncryptWorker'}.length
|
||||
# Sidekiq::ScheduledSet.new.select {|s| JSON.parse(s.value)['class'] == 'LetsEncryptWorker'}.each {|j| j.delete}
|
||||
|
||||
def letsencrypt
|
||||
Acme::Client.new(
|
||||
|
|
Loading…
Add table
Reference in a new issue