# Iframes

Las apps de Videsk se renderizan dentro de un `<iframe>` en [Consola](https://console.videsk.io/) y [Dashboard](https://app.videsk.io/). Para que el navegador permita embeber tu URL, ésta debe cumplir tres requisitos: HTTPS, cabeceras correctas y, si aplica, cookies con `SameSite=None`.

## `Content-Security-Policy` (CSP)

Configura la cabecera `Content-Security-Policy` en las respuestas de tu URL para autorizar a los dominios de Videsk a embeberte:

```
Content-Security-Policy: frame-ancestors 'self' https://*.videsk.io https://console.videsk.io;
```

Los dominios oficiales son:

* Consola: `https://console.videsk.io`
* Dashboard: `https://app.videsk.io`
* Wildcard recomendado: `https://*.videsk.io`

{% hint style="info" %}
Si actualmente usas la cabecera `X-Frame-Options`, está deprecada. Reemplázala por `Content-Security-Policy: frame-ancestors`.
{% endhint %}

## Cookies

Si tu app mantiene una sesión por cookies, confíguralas con `SameSite=None; Secure` para que el navegador no las bloquee al cargarse dentro del iframe:

```
Set-Cookie: session=xxx; SameSite=None; Secure; HttpOnly
```

De lo contrario, es típico caer en un loop de login porque la cookie de sesión nunca se persiste.

{% hint style="info" %}
Si tu app usa `localStorage` o `sessionStorage` en vez de cookies, omite este paso.
{% endhint %}

## HTTPS

Tu URL **debe** servirse por HTTPS. Contenido sobre `http://` será bloqueado por el navegador al estar embebido en un origen HTTPS.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videsk.io/es-developers/apps/integraciones/iframes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
