Support HEAD requests #68

Closed
opened 2023-12-21 18:58:24 +00:00 by alex · 3 comments

My image proxy does a HEAD request before downloading the file. void.cat doesn't support it, so as a result all images from void.cat look broken on my server, eg the profile of NVK: https://gleasonator.com/@e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411@mostr.pub

curl -I https://void.cat/d/MreaerC65YkE8zeHvVv6XM.webp

gives me:

HTTP/2 404 
date: Thu, 21 Dec 2023 18:57:16 GMT
strict-transport-security: max-age=15724800; includeSubDomains

it should give me:

HTTP/2 200 
date: Thu, 21 Dec 2023 18:57:50 GMT
content-type: image/webp
accept-ranges: bytes
cache-control: public,max-age=86400
x-frame-options: SAMEORIGIN
content-disposition: inline; filename="IMG_2914.JPG"
strict-transport-security: max-age=15724800; includeSubDomains

(the same result as a GET request, just without the body)

My image proxy does a HEAD request before downloading the file. void.cat doesn't support it, so as a result all images from void.cat look broken on my server, eg the profile of NVK: https://gleasonator.com/@e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411@mostr.pub ```sh curl -I https://void.cat/d/MreaerC65YkE8zeHvVv6XM.webp ``` gives me: ``` HTTP/2 404 date: Thu, 21 Dec 2023 18:57:16 GMT strict-transport-security: max-age=15724800; includeSubDomains ``` it _should_ give me: ``` HTTP/2 200 date: Thu, 21 Dec 2023 18:57:50 GMT content-type: image/webp accept-ranges: bytes cache-control: public,max-age=86400 x-frame-options: SAMEORIGIN content-disposition: inline; filename="IMG_2914.JPG" strict-transport-security: max-age=15724800; includeSubDomains ``` (the same result as a GET request, just without the body)
Author

Thank you, fixed by 83f51a4668

There's still something wrong with my media proxy, but I don't know what it is yet. I'll open a separate issue if I figure it out. Thanks!

Thank you, fixed by 83f51a4668bba5f7c4f3a80d1b39931001a5ceb3 There's still something wrong with my media proxy, but I don't know what it is yet. I'll open a separate issue if I figure it out. Thanks!
alex closed this issue 2023-12-22 17:36:07 +00:00
Author

It works now! It was just Nginx cache. Thanks again.

It works now! It was just Nginx cache. Thanks again.
Owner

Yes sorry forgot to mention!

Yes sorry forgot to mention!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/void.cat#68
No description provided.