# How can I add anti-clickjacking X-Frame-Options header to my installation of Discourse?

**URL:** <https://meta.discourse.org/t/how-can-i-add-anti-clickjacking-x-frame-options-header-to-my-installation-of-discourse/48596>\
**Category:** Development\
**Created:** [2016年八月13日 13:36 UTC](https://meta.discourse.org/t/how-can-i-add-anti-clickjacking-x-frame-options-header-to-my-installation-of-discourse/48596 "2016-08-13T13:36:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [2016年八月14日 04:10 UTC](https://meta.discourse.org/t/how-can-i-add-anti-clickjacking-x-frame-options-header-to-my-installation-of-discourse/48596/2 "2016-08-14T04:10:43Z")

</div>

> [@Add a custom HTTP header to requests made to your Discourse](https://meta.discourse.org/t/how-to-add-a-custom-http-header-to-your-discourse/26439):
>
> Add this to your app.yml: ## Remember, this is YAML syntax - you can only have one block with a name run: - exec: echo "Beginning of custom commands" # A man's not dead while his name is still spoken. - replace: filename: "/etc/nginx/conf.d/discourse.conf" from: /location \/ {/ to: | location / { add\_header X-Clacks-Overhead "GNU Terry Pratchett"; Make sure to rebuild the container afterwards. play_button Terry Pratchett, author of the Discworld novels, …

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-add-anti-clickjacking-x-frame-options-header-to-my-installation-of-discourse/48596)._
