diff --git a/cgi-bin/lookup.cgi b/cgi-bin/lookup.cgi index d4eb723..08cbcf7 100755 --- a/cgi-bin/lookup.cgi +++ b/cgi-bin/lookup.cgi @@ -44,7 +44,7 @@ module WaybackClassic query = cgi.params["q"].first response = begin - WebClient.open uri("https://web.archive.org/__wb/search/host", q: query) + WebClient.open uri("https://web.archive.org/__wb/search/host", q: query), "Referer" => "https://web.archive.org" rescue OpenURI::HTTPError raise ErrorReporting::ServerError.new("Couldn't retrieve information for this query or URL") end diff --git a/cgi-bin/search.cgi b/cgi-bin/search.cgi index 37be0eb..cc4f23d 100755 --- a/cgi-bin/search.cgi +++ b/cgi-bin/search.cgi @@ -44,7 +44,7 @@ module WaybackClassic query = cgi.params["q"].first response = begin - WebClient.open uri("https://web.archive.org/__wb/search/anchor", q: query) + WebClient.open uri("https://web.archive.org/__wb/search/anchor", q: query), "Referer" => "https://web.archive.org" rescue OpenURI::HTTPError raise ErrorReporting::ServerError.new("Couldn't retrieve results for these keywords") end