Skip to content

Commit 4990db0

Browse files
authored
set expire headers
1 parent 217e434 commit 4990db0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lets-encrypt/activate-ssl.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,15 @@ server {
173173
ssl_stapling_verify on;
174174
175175
location / {
176-
try_files \$uri \$uri/ /index.php?\$args;
176+
try_files \$uri \$uri/ /index.php?\$args;
177+
# https://veerasundar.com/blog/2014/09/setting-expires-header-for-assets-nginx/
178+
if ($request_uri ~* ".(ico|css|js|gif|jpe?g|png)$") {
179+
expires 15d;
180+
access_log off;
181+
add_header Pragma public;
182+
add_header Cache-Control "public";
183+
break;
184+
}
177185
}
178186
location /.well-known {
179187
root /usr/share/nginx/html;

0 commit comments

Comments
 (0)