C
C
C_oO_re2015-12-17 11:07:29
Nginx
C_oO_re, 2015-12-17 11:07:29

Why does the Last-Modified header not reach the client?

I'm trying to set up normal headers. the server returns the Last-Modified header, but it does not reach the client. If you complete the application at the time of setting the header, then it comes. Searches in the application for deleting this title lead to nothing.
KadHyff6ZCI.jpg
8bUPt924k4g.jpg

server {
    server_name host.dev1 www.host.dev1 *.host.dev1;
    charset off;
    disable_symlinks if_not_owner from=$root_path;
    index index.html index.php;
    root $root_path;
    set $root_path /home/user/data/www/host.dev1;
    access_log /var/log/nginx/host.dev1.access.log ;
    error_log /var/log/nginx/host.dev1.error.log notice;
    listen 192.168.1.16:80;
    location / {
        location ~ [^/]\.ph(p\d*|tml)$ {
            try_files /does_not_exists @fallback;
        }
        location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|pdf)$ {
        #   expires 3d;
            try_files $uri $uri/ @fallback;
        }
        location / {
            try_files /does_not_exists @fallback;
        }
    }
    location @fallback {
        error_log /dev/null crit;
        proxy_pass http://127.0.0.1:80;
        proxy_redirect http://127.0.0.1:80 /;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        access_log off ;
    }
    ssi on;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2015-12-17
@C_oO_re

What for do you need itssi on; ?
Reading the docs nginx.org/ru/docs/http/ngx_http_ssi_module.html#ss...

By default, the [Last-Modified] header field is removed because the content of the response changes during processing and may contain dynamically generated elements or parts that have changed independently of the original response.

E
Evgeny Svirsky, 2015-12-17
@e_svirsky

What is the response code? Not 302 by any chance?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question