# "replace" command does not works(discourse-docker)

**URL:** https://meta.discourse.org/t/replace-command-does-not-works-discourse-docker/142758
**Category:** Self-hosting
**Created:** [February 27, 2020, 10:05am UTC](https://meta.discourse.org/t/replace-command-does-not-works-discourse-docker/142758 "2020-02-27T10:05:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![marvin-min](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marvin-min/32/165573_2.png) [@marvin-min](https://meta.discourse.org/u/marvin-min)
#### Post date: [February 27, 2020, 10:05am UTC](https://meta.discourse.org/t/replace-command-does-not-works-discourse-docker/142758/1 "2020-02-27T10:05:54Z")

</div>

Hi guys, thank you for check this tipic.  
I met an issue when setting nginx header (discourse-docker Env).  
The following are dietails:  
we are using [GitHub - discourse/discourse\_docker: A Docker image for Discourse · GitHub](https://github.com/discourse/discourse_docker) to build our forum. Currently, the security said we need to add header info “Strict-Transport-Security”.

I checked “templates/web.ssl.template.yml” and remove others lines, just leave the follwing lines(whole file content), and I build the container, but the header did not added. Any one met the same issue?

```
run:
  - replace:
     filename: "/etc/nginx/conf.d/discourse.conf"
     from: "location @discourse {"
     to: |
       location @discourse {
       add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain

```

 ![Jietu20200227-180321@2x](https://global.discourse-cdn.com/meta/original/3X/8/b/8b733397bc7b473f38c0ca69b09625d9f27f2ec9.jpeg)

Thank you again for your patient.
