Forwarding headers for image upload


I’ve been using image upload via a URL a lot, and it was never a problem until I ran into this one:

When you open it in an browser, it works perfectly fine. And it’s also a small image that fits all the Cloudflare image limitations.

But uploading using this link doesn’t work. It returns an error. Both curl and wget also timeout for this one.
After a bit of experimentation I found out that this is because of the lack of the user agent header.
So this wget command works:

wget --header="authority:" \
  --header="user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36" \
  " Total Markets photos and gif_CC8.jpg"

So the question is two fold: which headers Cloudflare sends during download via URL, and is it possible to provide additional headers for cases like this?

This topic was automatically closed after 15 days. New replies are no longer allowed.