diff --git a/services/web/nginx.conf.template b/services/web/nginx.conf.template index 6b468808..d0e7a648 100644 --- a/services/web/nginx.conf.template +++ b/services/web/nginx.conf.template @@ -173,7 +173,8 @@ server { sub_filter_once off; } - location / { + + location ~* ^/(login|unlock|signup|forgot-password|dashboard|mechanic-dashboard|reset-password|my-profile|change-email|verify-vehicle|contact-mechanic|shop|past-orders|orders|forum|new-post|post)$ { try_files $uri /index.html =404; add_header Last-Modified $date_gmt; add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; @@ -181,4 +182,13 @@ server { expires off; etag off; } + + location / { + try_files $uri $uri/ =404; + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + if_modified_since off; + expires off; + etag off; + } } diff --git a/services/web/nginx.ssl.conf.template b/services/web/nginx.ssl.conf.template index d4e1defc..ce56a1b4 100644 --- a/services/web/nginx.ssl.conf.template +++ b/services/web/nginx.ssl.conf.template @@ -182,7 +182,7 @@ server { sub_filter_once off; } - location / { + location ~* ^/(login|unlock|signup|forgot-password|dashboard|mechanic-dashboard|reset-password|my-profile|change-email|verify-vehicle|contact-mechanic|shop|past-orders|orders|forum|new-post|post)$ { try_files $uri /index.html =404; add_header Last-Modified $date_gmt; add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; @@ -190,4 +190,13 @@ server { expires off; etag off; } + + location / { + try_files $uri $uri/ =404; + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + if_modified_since off; + expires off; + etag off; + } } diff --git a/services/web/src/components/layout/layout.js b/services/web/src/components/layout/layout.js index f1c07786..df17293f 100644 --- a/services/web/src/components/layout/layout.js +++ b/services/web/src/components/layout/layout.js @@ -342,4 +342,4 @@ StyledComp.propTypes = { fetchingData: PropTypes.bool, }; -export default StyledComp; +export default StyledComp; \ No newline at end of file