[NGINX] vhost config for reactjs app with no cache header - fourslickz/notes GitHub Wiki

NGINX VHOST CONF

server {
        listen 80;
        root /home/user/reactjs-app/build;

        index index.html;

        server_name reactjs.app;

        location / {
                # NO CACHE
                add_header Last-Modified $date_gmt;
                add_header Cache-Control 'no-store, no-cache';
                expires off;
                etag off;

                # REACT APP
                try_files $uri /index.html;
        }

}