# How to make proxy revalidate resource at origin

**URL:** <https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718>\
**Category:** NGINX\
**Created:** [September 27, 2013, 5:10pm UTC](https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718 "2013-09-27T17:10:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [September 27, 2013, 5:10pm UTC](https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718/1 "2013-09-27T17:10:16Z")

</div>

Hi,

I posted this on stackoverflow already but I thought I might have more  
luck  
here 🙂

> <https://stackoverflow.com/questions/19023777/how-to-make-proxy-revalidate-resource-from-origin>

In short, I can’t find a way to make nginx revalidate a cached resource  
with the origin. Whenever nginx is in front of my server, the origine  
never  
returns a 304. Nginx just gets a new copy whenever it expires, and I  
can’t  
trigger a revalidate either. I’ve tried different approaches with  
cache-control headers but nginx doesn’t seem to respect them.

Cheers,  
Thijs

---

<div class="post-metadata">

**Author:** ![Thijs\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@Thijs\_K](https://www.ruby-forum.com/u/Thijs_K)\
**Post date:** [September 27, 2013, 5:14pm UTC](https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718/2 "2013-09-27T17:14:57Z")

</div>

On Sep 27, 2013, at 7:09 PM, Thijs K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I posted this on stackoverflow already but I thought I might have more luck here  
> 🙂

> <https://stackoverflow.com/questions/19023777/how-to-make-proxy-revalidate-resource-from-origin>

> In short, I can’t find a way to make nginx revalidate a cached resource with the  
> origin. Whenever nginx is in front of my server, the origine never returns a 304.  
> Nginx just gets a new copy whenever it expires, and I can’t trigger a revalidate  
> either. I’ve tried different approaches with cache-control headers but nginx  
> doesn’t seem to respect them.

You may want to check this 🙂

[http://trac.nginx.org/nginx/roadmap](http://trac.nginx.org/nginx/roadmap)

---

<div class="post-metadata">

**Author:** ![Thijs\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@Thijs\_K](https://www.ruby-forum.com/u/Thijs_K)\
**Post date:** [September 27, 2013, 5:28pm UTC](https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718/3 "2013-09-27T17:28:59Z")

</div>

Aha, I’m hoping that will include If-None-Match, since I’m using etags  
instead of last modified dates.

Is there maybe a 3rd party module that supports this already?

---

<div class="post-metadata">

**Author:** ![Thijs\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/53a042/32.png) [@Thijs\_K](https://www.ruby-forum.com/u/Thijs_K)\
**Post date:** [September 27, 2013, 6:05pm UTC](https://www.ruby-forum.com/t/how-to-make-proxy-revalidate-resource-at-origin/236718/4 "2013-09-27T18:05:13Z")

</div>

Maybe via Lua?

Posted at Nginx Forum:

> **[Re: How to make proxy revalidate resource at origin](https://forum.nginx.org/read.php?2,243204,243211#msg-243211)**
>
> Hi, I posted this on stackoverflow already but I thought I might have more luck here :) http://stackoverflow.com/questions/19023777/how-to-make-proxy-revalidate-resource-from-origin In short, I can't find a way to make nginx revalidate a cached...
