mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
ensure forward slash
This commit is contained in:
parent
a5fdbfe4a7
commit
bb44965c8e
2 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,9 @@ class PurgeCacheWorker
|
|||
end
|
||||
|
||||
def perform(proxy_ip, username, path)
|
||||
# Must always have a forward slash
|
||||
path = '/' + path if path[0] != '/'
|
||||
|
||||
url = Addressable::URI.encode_component(
|
||||
"http://#{proxy_ip}/:cache/purge#{path}",
|
||||
Addressable::URI::CharacterClasses::QUERY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue