# Issue with Oneboxing an image from a specific domain

**URL:** https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614
**Category:** Support
**Created:** [April 19, 2024, 12:30pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614 "2024-04-19T12:30:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 19, 2024, 12:30pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614/1 "2024-04-19T12:30:06Z")

</div>

Can anyone shed any light as to what may be going on here? 🤔

I have two images. They are identical. The only difference is the domain name.

One image refuses to onebox on my Discourse running 3.3.0.beta2-dev ([7a083daf27](https://github.com/discourse/discourse/commits/7a083daf270ea720eba3fef09fd54b7fb7d54b92)), the other image will onebox just fine with no issues.

Image one: `https://dronescene.co.uk/images/uploads/temporiginal/test11.png`

Image two: `https://dev.dronescene.co.uk/images/uploads/temporiginal/test11.png`

While scratching my head and trying to work out what the issue might be, I noticed the onebox url is appending a few extra parameters on the end of the URL:

 ![Screenshot 2024-04-19 at 13.11.55](https://global.discourse-cdn.com/meta/original/4X/2/f/2/2f2a7da3d96af2e3a1d216c230f5ee21686d1c78.jpeg)

I think this is a red herring though 🤔

If I view both images directly in a browser tab and look at the HTTP response headers in the network tab of the browser console, I can’t see any differences between the two.

There are no errors in my Discourse logs.

Might I have applied some domain-specific settings on my Discourse that I’ve long since forgotten about? 🤔

What else could cause the Onebox to throw a HTTP/404 when the image is actually there? 🤔

Where might I start in debugging why one url works and the other does not? 🤔

If relevant, both domains are proxied via Cloudflare - but all identical in the settings there too.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 19, 2024, 1:53pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614/2 "2024-04-19T13:53:37Z")

</div>

> [@Richie](#):
>
> both domains are proxied via Cloudflare

Isn’t one of the main uses of Cloudflare to block bots from requesting files from your site? Looks like it’s working as intended 😆

You should check your Cloudflare configuration, there will be a way to disable bot protection there.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 19, 2024, 3:03pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614/3 "2024-04-19T15:03:38Z")

</div>

> [@Falco](#):
>
> Looks like it’s working as intended 😆

Does it? 🤔

What’s the difference? 🤔

The IP address of the Discourse server is whitelisted on Cloudflare and I can curl/wget both images from the command line of the server running Discourse.

Struggling to understand why the onebox works on one image but not the other image.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 19, 2024, 3:14pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614/4 "2024-04-19T15:14:00Z")

</div>

> [@Richie](#):
>
> I can curl/wget both images from the command line of the server running Discourse.

Since you control both servers, can you check what is the exact request, down to verb, user-agent and other headers and try to reproduce with a cURL that mimics it?

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 19, 2024, 3:30pm UTC](https://meta.discourse.org/t/issue-with-oneboxing-an-image-from-a-specific-domain/304614/5 "2024-04-19T15:30:12Z")

</div>

Ah, excellent idea 👍
