mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
follow redirects
This commit is contained in:
parent
749f2fd5e0
commit
f92d6c6139
3 changed files with 4 additions and 3 deletions
|
@ -76,6 +76,7 @@ map '/sidekiq' do
|
|||
username == $config['sidekiq_user'] && password == $config['sidekiq_pass']
|
||||
end
|
||||
|
||||
Sidekiq::Web.set 'session_secret', $config['session_secret']
|
||||
use Rack::Session::Cookie, key: 'sidekiq.session', secret: $config['session_secret']
|
||||
use Rack::Protection::AuthenticityToken
|
||||
run Sidekiq::Web
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ class DeleteCacheWorker
|
|||
Addressable::URI::CharacterClasses::QUERY
|
||||
)
|
||||
|
||||
HTTP.timeout(read: 10, write: 10, connect: 2).
|
||||
HTTP.follow.timeout(read: 10, write: 10, connect: 2).
|
||||
headers(host: URI::encode("#{username}.neocities.org")).
|
||||
get(url)
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class PurgeCacheWorker
|
|||
retry_encoded = false
|
||||
|
||||
begin
|
||||
HTTP.timeout(read: 10, write: 10, connect: 2).
|
||||
HTTP.follow.timeout(read: 10, write: 10, connect: 2).
|
||||
headers(host: URI::encode("#{username}.neocities.org"), cache_purge: '1').
|
||||
head(url)
|
||||
rescue URI::InvalidURIError
|
||||
|
|
Loading…
Add table
Reference in a new issue