# Richieste Onebox reindirizzate erroneamente a causa dell'user-agent

**URL:** <https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557>\
**Category:** Product Support\
**Created:** [17 Giugno 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:** 15

<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:** [17 Giugno 2019, 10:45am UTC](https://meta.discourse.org/t/onebox-requests-being-incorrectly-redirected-due-to-user-agent/120557/15 "2019-06-17T10:45:43Z")

</div>

Thanks @codinghorror and @merefield

When I try a curl with the header Discourse, I get a completely different result.  
`curl -X GET https://link.jig.space/gXszoFiWkX -H 'User-Agent: Discourse'`

It takes me to a 304 temp redirect to a page with a script that makes a 2nd redirect back to our home page:  
`window.top.location = validate("http://jig.space/?_branch_match_id=667900471741258199");`

And of course there are no `og:` tags in those responses.

So it is something to do with my redirects upon getting the Discourse user agent.

Thanks again 🙂 I’ll report back when I fix it.

---

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