mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
Merge branch 'master' of github.com:neocities/neocities
This commit is contained in:
commit
4bab84cf9d
2 changed files with 9 additions and 1 deletions
|
@ -117,7 +117,7 @@ class Site < Sequel::Model
|
|||
custom_ssl_certificates: false,
|
||||
no_file_restrictions: false,
|
||||
custom_domains: false,
|
||||
maximum_site_files: 1000
|
||||
maximum_site_files: 2000
|
||||
)
|
||||
|
||||
def self.newsletter_sites
|
||||
|
|
|
@ -18,11 +18,19 @@ class PurgeCacheWorker
|
|||
"http://#{proxy_ip}#{path}",
|
||||
Addressable::URI::CharacterClasses::QUERY
|
||||
)
|
||||
|
||||
retry_encoded = false
|
||||
|
||||
begin
|
||||
RestClient::Request.execute method: :head, url: url, timeout: HTTP_TIMEOUT, headers: {
|
||||
host: URI::encode("#{username}.neocities.org"),
|
||||
cache_purge: '1'
|
||||
}
|
||||
rescue URI::InvalidURIError
|
||||
raise if retry_encoded == true
|
||||
url = URI.encode url
|
||||
retry_encoded = true
|
||||
retry
|
||||
rescue RestClient::ResourceNotFound
|
||||
rescue RestClient::Forbidden
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue