# La configuración "blocked onebox domains" no se respeta

**URL:** <https://meta.discourse.org/t/blocked-onebox-domains-setting-not-respected/218479>\
**Category:** Bug\
**Created:** [16 Febrero, 2022 21:35 UTC](https://meta.discourse.org/t/blocked-onebox-domains-setting-not-respected/218479 "2022-02-16T21:35:05Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [11 Marzo, 2022 00:22 UTC](https://meta.discourse.org/t/blocked-onebox-domains-setting-not-respected/218479/20 "2022-03-11T00:22:21Z")

</div>

Recomiendo esperar a que llegue nuestra solución, tenemos una PR en progreso:

> <https://github.com/discourse/discourse/pull/16150>
>
> The \`blocked onebox domains\` setting lets site owners change what sites
> are all…owed to be oneboxed. When a link is entered into a post,
> Discourse checks the domain of the link against that setting and blocks
> the onebox if the domain is blocked. But if there's a chain of
> redirects, then only the final destination website is checked against
> the site setting.
> 
> This commit amends that behavior so that every website in the redirect
> chain is checked against the site setting, and if anything is blocked
> the original link doesn't onebox at all in the post. The
> \`Discourse-No-Onebox\` header is also checked in every response and the
> onebox is blocked if the header is set to "1".
> 
> Additionally, Discourse will now include the \`Discourse-No-Onebox\`
> header with every response if the site requires login to access content.
> This is done to signal to a Discourse instance that it shouldn't attempt
> to onebox other Discourse instances if they're login-only. Non-Discourse
> websites can also use include that header if they don't wish to have
> Discourse onebox their content.
> 
> Internal ticket: t59305.

Modifica el comportamiento para que:

1. Realicemos la verificación de la lista de bloqueo en cada salto de una cadena de redirección.
2. Introduzcamos una nueva función para que cualquier sitio pueda optar por no participar en oneboxing estableciendo una cabecera personalizada.

Esto resolverá el problema de @dschaper y nos dará más flexibilidad en el futuro.

Desafortunadamente, optar por `no store` abarcaría una red demasiado amplia y atraparía demasiados falsos positivos.

---

_[View the full topic](https://meta.discourse.org/t/blocked-onebox-domains-setting-not-respected/218479)._
