weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
2.05k stars 200 forks source link

Blocked policy - drive.google.com #378

Closed berejant closed 1 year ago

berejant commented 1 year ago

Weserv blocks image hosted at Google Drive:

Example 1: Origin URL: https://drive.google.com/uc?export=view&id=1fKbjdN_V6lLNTfY1uoA1oaLMSSQEN_a2 Weserv URL: https://images.weserv.nl/?url=https%3A%2F%2Fdrive.google.com%2Fuc%3Fexport%3Dview%26id%3D1fKbjdN_V6lLNTfY1uoA1oaLMSSQEN_a2

Example 2: Origin url: https://drive.google.com/uc?export=view&id=1NA69YsCf1BhIXvGSr-RMB64DurPc5qAo Weserv url: https://images.weserv.nl/?url=https%3A%2F%2Fdrive.google.com%2Fuc%3Fexport%3Dview%26id%3D1NA69YsCf1BhIXvGSr-RMB64DurPc5qAo&w=238&h=163

Acutal error: {"status":"error","code":404,"message":"The hostname of the origin is unresolvable (DNS) or blocked by policy."}

andrieslouw commented 1 year ago

Will need to investigate, as Google likes to block our servers/IP-ranges. See also #231.

kleisauke commented 1 year ago

It appears that Google Drive now sends a response header of significant size, exceeding our default 4k limit.

$ curl --http1.1 -fsSL -o /dev/null -w "%{size_header}\n" 'https://drive.google.com/uc?export=view&id=1fKbjdN_V6lLNTfY1uoA1oaLMSSQEN_a2'
5604

This has been fixed with commit ca63088b93de7501eeb5d9f298380e36162b566f, which has just been rolled out to production. Thanks for reporting this!