diff options
author | pks <pks@pks.rocks> | 2021-03-29 08:05:22 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2021-03-29 08:05:22 +0200 |
commit | 9076abf2fb99c6ce87c80b7a8cf8680034cc32a3 (patch) | |
tree | b2ddf936637919ef5bc5b5cfcbf8fe34a5eee233 | |
parent | ba130b56aa6b5fadfbec76962300a7e1d1542f24 (diff) |
allow 301
-rw-r--r-- | hosts.txt.example | 2 | ||||
-rwxr-xr-x | up.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hosts.txt.example b/hosts.txt.example index a526dc5..aacd038 100644 --- a/hosts.txt.example +++ b/hosts.txt.example @@ -1 +1 @@ -google.de http:80/tcp @https://www.google.de +google.de http:80/tcp @https://google.de @@ -53,7 +53,8 @@ class Host begin url = URI site response = Net::HTTP.get_response url - return response.kind_of? Net::HTTPSuccess + #return response.kind_of? Net::HTTPSuccess + return [200, 301].include? response.code.to_i rescue return false end |