Issue with Onebox failing on one server, but not another

Guys, I’ve been experimenting with AliExpress as an affiliate.

Recently their Oneboxes have started to fail on the site I use them for.

I dug into things and noticed it works on another Discourse server of mine. Both have identical versions of Discourse (2.4.0.beta11) and are running on VPS from Scaleway using Ubuntu.

However, I compare the the trips from the command prompt using curl, I notice there is an extra 302 redirect on the server that is failing, even though they apparently resolve to the same URL ultimately.

Could this be causing things to fail with the current Onebox code?

I’m using the following to bring back the jumps (it includes the URL):

curl -sLD - http://s.click.aliexpress.com/e/nzyWNlXw -o /dev/null -w '%{url_effective}'

Could there have been a recent change to Onebox that could have made it more sensitive to this?

I’m going to have to apologise if I’ve said anything naive because I’m not an expert in this specific domain!

2 Likes

OK this is getting weirder yet closer to the reason I suspect:

If I take the final URL from the Curl and enter it into a local browser, the one from the failing server takes me to a log-on prompt, the one from the working server doesn’t.

3 Likes

In which case one asset is on a CDN with hotlink protection, the other is not.

Hey Stephen the link is the same in both cases. I think the target simply doesn’t trust one of the servers?

Not necessarily, even the two source servers are in the same datacenter and hitting the same load balancer for a CDN they won’t necessarily be talking to the same backend machine.

1 Like

Good point. But it still leads to the same, repeatable, undesirable outcome which is frustrating.