Skip to content

Commit aaabcd4

Browse files
committedDec 31, 2022
Fix cache regex
1 parent 370c6f8 commit aaabcd4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎docker/nginx-default.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ server {
2727
return 200 "User-agent: *\nDisallow: /";
2828
}
2929

30-
location ~ ^/(css|js|images)$ {
30+
location ~ ^/(css|js|images)/ {
3131
access_log off;
3232
expires max;
3333
}

‎test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ checkUrl "http://${TEST_ADDR}/.nginx/status" -I
3535
checkUrl "http://${TEST_ADDR}/.phpfpm/status" -I
3636
checkUrl "http://${TEST_ADDR}/index.php" -I
3737
checkUrl "http://${TEST_ADDR}/robots.txt" -I
38+
checkUrl "http://${TEST_ADDR}/images/default/logo-small.png" -I | grep -F "Cache-Control: max-age=315360000"
3839

3940
checkUrl "http://${TEST_ADDR}/index.php" | grep -q -F "1.2.6.4"
4041
checkUrl "http://${TEST_ADDR}/cmd.php" "form" "cmd=login&server_id=1&nodecode%5Blogin_pass%5D=1&login=cn%3Dadmin%2Cdc%3Dexample%2Cdc%3Dorg&login_pass=ldapadminpass&submit=Authenticate" | grep -q -F "Successfully logged into server."

0 commit comments

Comments
 (0)
Please sign in to comment.