Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7845791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:21:44+00:00 2026-06-02T17:21:44+00:00

I am trying to use the HTTP_IF_MODIFIED_SINCE header in my app to determine if

  • 0

I am trying to use the HTTP_IF_MODIFIED_SINCE header in my app to determine if resources are stale/fresh and render 200/304 in those cases.
In my dev environment everything works fine but I can’t for the life of me get it to work in production.

I am using Passenger 3.0.11 and Nginx 1.0.13.

As you see below, I tried proxy_pass_header, proxy_set_header, passenger_pass_header and passenger_set_cgi_param. The last one actually sets a HTTP_IF_MODIFIED_SINCE header but it is empty…
Any help/ideas would be greatly appreciated!

My config:

server {
  listen             80 default_server;
  root               /home/rails/myapp/current/public;
  passenger_enabled  on;
  charset            utf-8;

  proxy_pass_header If-Modified-Since;
  proxy_set_header If-Modified-Since $http_if_modified_since;
  passenger_pass_header If-Modified-Since;
  passenger_set_cgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;

  if (-f $document_root/system/maintenance.html) {
    rewrite ^(.*)$ /system/maintenance.html break;
  }

  location ~ \.(aspx|jsp|cgi)$ {
    return 410;
  }

  location ~ ^/(assets)/ {
    # http://guides.rubyonrails.org/asset_pipeline.html#server-configuration
    # gzip_static on;
    expires     1y;
    add_header  Cache-Control public;

    add_header Last-Modified "";
    add_header ETag "";
    break;
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:21:45+00:00Added an answer on June 2, 2026 at 5:21 pm

    This was a user error after all. I sent the header to the app in the wrong format (IF_MODIFIED_SINCE instead of If-Modified-Since). After fixing that, it worked without any of the extra directives.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to use this code: if($_SERVER['HTTP_PORT'] !== 443 && !isset($_SERVER['HTTPS'])) { header('Location:
I was trying to use Thin app server and had one issue. When nginx
I was trying to use http://www.jongsma.org/gc/scripts/ofx-ba.py to grab my bank account information from wachovia.
I am trying to use http://code.google.com/p/as3svgrendererlib/ in my flash cs 5.5 project to import
We're trying to use Axis2 to call a web service that cannot use HTTP/1.1
Im trying to use Nets/HTTP to use POST and put in a custom user
I am trying to use the http_get function. But I get a undefined reference
I'm trying to use this http://www.rcsb.org/pdb/software/rest.do REST services with Qt. I did some get
I'm seeing a very strange error when trying to use ViewPagerIndicator (http://viewpagerindicator.com/). I've narrowed
I am trying to use the focusout( http://api.jquery.com/focusout/ ) function in jQuery, to perform

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.