# Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin'

**URL:** <https://meta.discourse.org/t/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin/87290>\
**Category:** Product Support\
**Created:** [May 11, 2018, 7:11pm UTC](https://meta.discourse.org/t/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin/87290 "2018-05-11T19:11:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![bobhy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bobhy/32/167661_2.png) [@bobhy](https://meta.discourse.org/u/bobhy)\
**Post date:** [November 11, 2018, 6:48am UTC](https://meta.discourse.org/t/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin/87290/7 "2018-11-11T06:48:57Z")

</div>

> [@Jane\_Jojo](#):
>
> curl -X HEAD -I

I was having this same problem (right now, with up-to-the-moment Ghost and Discourse), and fixed it by changing the _Discourse_ site, not the parent Ghost site.

And it was a struggle to get rid of the `x-frame-options` headers coming from Discourse! I ended up with this in my Nginx site configuration:

```plaintext
location / {
        proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_hide_header 'x-frame-options';
        add_header x-frame-options ALLOWALL;

```

---

_[View the full topic](https://meta.discourse.org/t/refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin/87290)._
