# Add to route headers?

**URL:** <https://meta.discourse.org/t/add-to-route-headers/111929>\
**Category:** Product Support\
**Created:** [March 18, 2019, 2:10pm UTC](https://meta.discourse.org/t/add-to-route-headers/111929 "2019-03-18T14:10:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)\
**Post date:** [March 21, 2019, 12:58am UTC](https://meta.discourse.org/t/add-to-route-headers/111929/8 "2019-03-21T00:58:35Z")

</div>

I think this will help in resolving the issue  
add to nginx  
location /logs/messages.json {  
}

```plaintext
add_header Cache-Control "no-store";
add_header Pragma "no-cache";

```

How to do this through middleware?

```plaintext
req = Rack::Request.new(@env)
    route = req.path_info.to_s
  if (route == '/logs/messages.json')
    #add headers
  end

```

---

_[View the full topic](https://meta.discourse.org/t/add-to-route-headers/111929)._
