mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 01:01:30 +02:00
add proxy dnslink adder
This commit is contained in:
parent
99cd5d1ab8
commit
0c54347d4d
2 changed files with 13 additions and 0 deletions
|
@ -730,6 +730,14 @@ class Site < Sequel::Model
|
|||
archives_dataset.where(ipfs_hash: ipfs_hash).first.update updated_at: Time.now
|
||||
end
|
||||
end
|
||||
|
||||
add_redis_proxy_dnslink
|
||||
end
|
||||
|
||||
def add_redis_proxy_dnslink
|
||||
if host =~ /(.+)\.neocities\.org/ && latest_archive
|
||||
$redis_proxy.hset "dns-#{host}", 'TXT', "dnslink=/ipfs/#{latest_archive.ipfs_hash}"
|
||||
end
|
||||
end
|
||||
|
||||
def latest_archive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue