Forwarding headers for image upload

Hello!

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

https://www.nasdaq.com/sites/acquia.prod/files/2019-05/0902-Q19%20Total%20Markets%20photos%20and%20gif_CC8.jpg

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: www.nasdaq.com" \
  --header="user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" \
  "https://www.nasdaq.com/sites/acquia.prod/files/2019-05/0902-Q19 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.