mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 18:48:38 +02:00
Add "myip6" URL parameter to provide an IPv6 address in addition to an IPv4 one as "myip"
This commit is contained in:
@@ -11,9 +11,9 @@ module Dyndnsd
|
||||
return [403, {"Content-Type" => "text/plain"}, ["Forbidden"]] if state == :host_forbidden
|
||||
return [422, {"Content-Type" => "text/plain"}, ["Hostname malformed"]] if state == :hostname_malformed
|
||||
end
|
||||
|
||||
|
||||
def response_for_changes(states, ip)
|
||||
body = states.map { |state| state == :good ? "Changed to #{ip}" : "No change needed for #{ip}" }.join("\n")
|
||||
body = states.map { |state| state == :good ? "Changed to #{ip.is_a?(Array) ? ip.join(' ') : ip}" : "No change needed for #{ip.is_a?(Array) ? ip.join(' ') : ip}" }.join("\n")
|
||||
return [200, {"Content-Type" => "text/plain"}, [body]]
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user