From 034f8d82c700f37247a395da534e33b21d372c1d Mon Sep 17 00:00:00 2001 From: pks Date: Mon, 29 Mar 2021 08:08:58 +0200 Subject: allow 401 --- up.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/up.rb b/up.rb index 0db1ea0..a9b7781 100755 --- a/up.rb +++ b/up.rb @@ -53,8 +53,9 @@ class Host begin url = URI site response = Net::HTTP.get_response url + puts response.code #return response.kind_of? Net::HTTPSuccess - return [200, 301].include? response.code.to_i + return [200, 301, 401].include? response.code.to_i rescue return false end -- cgit v1.2.3