I'm building a laravel application and I'm trying to enable browser caching.
I tried to set expires/cache-control in a custom nginx-app.conf file located in my application root. (https://cloud.google.com/appengine/docs/flexible/php/reference/app-yaml)
Content of nginx-app.conf:
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv|svgz?|ttf|ttc|otf|eot|woff|woff2) {
expires 30d;
add_header Pragma public;
add_header Cache-Control "max-age: 2592000,public";
}
But the headers still contain the default cache-control of 600 seconds from google.
cache-control: max-age=600
cache-control: public
content-encoding: gzip
content-type: text/css
date: Fri, 14 Jun 2019 10:19:07 GMT
etag: W/"5d03719d-6ffe"
expires: Fri, 14 Jun 2019 10:29:07 GMT
last-modified: Fri, 14 Jun 2019 10:06:21 GMT
server: nginx
status: 200
vary: Accept-Encoding
via: 1.1 google