# Iframe в содержании темы не пытается загрузиться

**URL:** <https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305>\
**Category:** Support\
**Created:** [02.Июль.2023 09:30:16 UTC](https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305 "2023-07-02T09:30:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerome/32/313972_2.png) [@Jerome](https://meta.discourse.org/u/Jerome)\
**Post date:** [02.Июль.2023 09:30:16 UTC](https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305/1 "2023-07-02T09:30:16Z")

</div>

Я продолжил обсуждение этой темы [Iframe question - #3](https://meta.discourse.org/t/iframe-question/83167/3), но, думаю, немного отошел от первоначальной темы.

Этот пост [Iframe question - #3](https://meta.discourse.org/t/iframe-question/83167/3) успешно загружает URL с описанием к моей статье в блоге. Однако блок ниже, содержащий iframe, даже не пытается загрузиться, что видно при проверке вкладки «Сеть» (F12) при просмотре поста в Discourse. Ни одного запроса к [miniglot.com](http://miniglot.com) (Next.js, размещенный на Vercel с Cloudflare для DNS) не отправляется, только к [forum.miniglot.com](http://forum.miniglot.com) (сервер Discourse, размещенный отдельно).

**Разметка поста:**

```plaintext
https://miniglot.com/blog/welcome-to-the-miniglot-community

<iframe url="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>

```

**Настройка CORS-источника в Discourse:**

- https [miniglot.com](http://miniglot.com)
- https [www.miniglot.com](http://www.miniglot.com)

**Настройка «разрешенные iframes» в Discourse:**

- [miniglot.com](http://miniglot.com)
- https [www.miniglot.com](http://www.miniglot.com)
- https [miniglot.com](http://miniglot.com)
- https [miniglot.com/blog/welcome-to-the-miniglot-community](http://miniglot.com/blog/welcome-to-the-miniglot-community)
- https [www.miniglot.com/blog/welcome-to-the-miniglot-community](http://www.miniglot.com/blog/welcome-to-the-miniglot-community)

**Мой файл next.config.js на [miniglot.com](http://miniglot.com):**  
… хотя, думаю, это даже не в зоне ответственности, так как я не вижу, чтобы сервер вообще когда-либо вызывался:

```plaintext
...
async headers() {
    return [
      {
        source: '/(.*)',
        headers: [
          {
            key: 'X-Frame-Options',
            value: 'ALLOWALL',
          },
          {
            key: 'Content-Security-Policy',
            value: "frame-ancestors 'self' https://forum.miniglot.com;",
          },
        ],
      },
    ]
  },
...

```

Любые советы, друзья? Возможно, я пока откажусь от iframes, что жаль, так как, думаю, это помогло бы новичкам понять, что такое категория «комментарии к блогу» в моем Discourse и как она связана со страницами блога.

---

<div class="post-metadata">

**Author:** ![Jerome](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerome/32/313972_2.png) [@Jerome](https://meta.discourse.org/u/Jerome)\
**Post date:** [02.Июль.2023 09:35:33 UTC](https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305/2 "2023-07-02T09:35:33Z")

</div>

Добавим изображение, чтобы читателю было проще воспринимать информацию:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/5/1/8517d02cfe6a1d19b202739d4f02b5541e220290.png)

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [02.Июль.2023 15:51:31 UTC](https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305/3 "2023-07-02T15:51:31Z")

</div>

Проблема, возможно, здесь:

`<iframe url="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>`

Думаю, теги iframe не принимают атрибут `url`. Попробуйте заменить его на `src`:

`<iframe src="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>`

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [01.Август.2023 15:52:02 UTC](https://meta.discourse.org/t/iframe-in-topic-content-is-not-attempting-to-load/270305/4 "2023-08-01T15:52:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
