# Solicitações Onebox sendo redirecionadas incorretamente devido ao user-agent

**URL:** <https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557>\
**Category:** Product Support\
**Created:** [Junho 17, 2019, 7:07am UTC](https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557 "2019-06-17T07:07:06Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![JezPez](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jezpez/32/145071_2.png) [@JezPez](https://meta.discourse.org/u/JezPez)\
**Post date:** [Junho 17, 2019, 7:07am UTC](https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557/1 "2019-06-17T07:07:07Z")

</div>

I’ve never developed with Ruby before so I’m struggling to understand why OneBox is returning with a blank preview from our link, when iFramely and Slack render it fine.

Here is a sample link we are trying to render, it has been whitelisted in our Discourse instance.  
`https://link.jig.space/kEhFbFwkcW`

A working iFramely link is here: [Welcome to Iframely](https://iframely.com/embed/https%3A%2F%2Flink.jig.space%2FgXszoFiWkX)  
It extracts the appropriate open graph tags to make the preview.

We are using `branch.io` as our link shortener, with some intelligent redirects if the user is on iOS and has our app installed then it opens the app, but if they’re on desktop it goes to our microsite `https://jig.space`. Could this have something to do with why OneBox can’t infer the open graph tags while iFramely can?

I tried putting a few `puts` in the code to figure out why OneBox returns a 404 when previewing our links, and although the Discourse codebase is easy enough to read, I’m too new with Ruby to investigate further.

It would be an awesome feature to have some kind of debug flag for OneBox with more verbose logging as it seems lots of people on here (including me!) have some confusions about how oEmbed and Open Graph are supposed to work.

Could anyone help me debug OneBox further or let me know of any tools to figure this out?

---

_[View the full topic](https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557)._
