diff --git a/models/site.rb b/models/site.rb index bf97c16e..29f3c60d 100644 --- a/models/site.rb +++ b/models/site.rb @@ -1201,7 +1201,7 @@ class Site < Sequel::Model def default_schema # Switch-over for when SSL defaulting is ready - 'http' + 'https' end def uri diff --git a/workers/delete_cache_worker.rb b/workers/delete_cache_worker.rb index 810dc971..87e046be 100644 --- a/workers/delete_cache_worker.rb +++ b/workers/delete_cache_worker.rb @@ -20,11 +20,11 @@ class DeleteCacheWorker path = '/' + path if path[0] != '/' url = Addressable::URI.encode_component( - "http://#{proxy_ip}/:cache/purge#{path}", + "https://#{proxy_ip}/:cache/purge#{path}", Addressable::URI::CharacterClasses::QUERY ) - HTTP.follow.timeout(read: 10, write: 10, connect: 2). + HTTP.timeout(read: 10, write: 10, connect: 2). headers(host: URI::encode("#{username}.neocities.org")). get(url) end diff --git a/workers/purge_cache_worker.rb b/workers/purge_cache_worker.rb index ce30e3b8..a362119d 100644 --- a/workers/purge_cache_worker.rb +++ b/workers/purge_cache_worker.rb @@ -15,14 +15,14 @@ class PurgeCacheWorker path = '/' + path if path[0] != '/' url = Addressable::URI.encode_component( - "http://#{proxy_ip}#{path}", + "https://#{proxy_ip}#{path}", Addressable::URI::CharacterClasses::QUERY ) retry_encoded = false begin - HTTP.follow.timeout(read: 10, write: 10, connect: 2). + HTTP.timeout(read: 10, write: 10, connect: 2). headers(host: URI::encode("#{username}.neocities.org"), cache_purge: '1'). head(url) rescue URI::InvalidURIError