diff app/lib/legit_client.rb @ 236:498043313523 legit-client

Support multiple headers
author nanaya <me@nanaya.net>
date Sat, 15 Jul 2023 01:40:31 +0900
parents 7a773720d81f
children 961d362e42c7
line wrap: on
line diff
--- a/app/lib/legit_client.rb	Fri Jul 14 22:43:40 2023 +0900
+++ b/app/lib/legit_client.rb	Sat Jul 15 01:40:31 2023 +0900
@@ -52,7 +52,7 @@
   end
 
   def self.fetch(uri)
-    Net::HTTP.get(URI(uri), $cfg[:headers])
+    Net::HTTP.get(URI(uri), $cfg[:headers].sample)
   end
 
   def self.normalize_entity_media(json)