# Referrer-Policyのカスタマイズを許可

**URL:** https://meta.discourse.org/t/allow-customization-of-referrer-policy/106832
**Category:** Feature
**Created:** [2019 年 1 月 17 日午後 6:28 UTC](https://meta.discourse.org/t/allow-customization-of-referrer-policy/106832 "2019-01-17T18:28:16Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![msheiny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/msheiny/32/129304_2.png) [@msheiny](https://meta.discourse.org/u/msheiny)
#### Post date: [2019 年 1 月 18 日午前 1:02 UTC](https://meta.discourse.org/t/allow-customization-of-referrer-policy/106832/4 "2019-01-18T01:02:52Z")

</div>

So if anyone else is reading this… I ended up having to do something like this in my config. It looks like the duplicate header was actually in my container still. I’m kind of perplexed why its still there but I didn’t have time to dig. Was easier to just remove it.

```yaml
hooks:
  before_bundle_exec:
    - exec:
        cmd:
          - sed -i '/add_header Referrer-Policy/d' /etc/nginx/conf.d/discourse.conf
   after_bundle_exec:
    - exec:
        cmd:
          - sed -i 's/"Referrer-Policy"\ =>\ "strict-origin-when-cross-origin"/"Referrer-Policy" => "same-origin"/g' $(find /var/www -type f -name 'railtie.rb' | grep action_dispatch)

```

---

_[View the full topic](https://meta.discourse.org/t/allow-customization-of-referrer-policy/106832)._
