|
16 | 16 | <IfModule mod_headers.c>
|
17 | 17 |
|
18 | 18 | # No content
|
19 |
| - <If "-z %{CONTENT_TYPE}"> |
20 |
| - Header merge Cache-Control "no-store" |
21 |
| - </If> |
| 19 | + Header merge Cache-Control "no-store" "expr=%{CONTENT_TYPE} -z" |
22 | 20 |
|
23 | 21 | # Manifest files
|
24 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#application/manifest\+json#i"> |
25 |
| - Header merge Cache-Control "public" |
26 |
| - </ElseIf> |
27 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#text/cache-manifest#i"> |
28 |
| - Header merge Cache-Control "no-cache" |
29 |
| - </ElseIf> |
| 22 | + Header merge Cache-Control "public" "expr=%{CONTENT_TYPE} =~ m#application/manifest\+json#i" |
| 23 | + Header merge Cache-Control "no-cache" "expr=%{CONTENT_TYPE} =~ m#text/cache-manifest#i" |
30 | 24 |
|
31 | 25 | # Assets
|
32 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#image/svg\+xml#i"> |
33 |
| - Header merge Cache-Control "public, immutable, stale-while-revalidate" |
34 |
| - </ElseIf> |
| 26 | + Header merge Cache-Control "public, immutable, stale-while-revalidate" "expr=%{CONTENT_TYPE} =~ m#image/svg\+xml#i" |
35 | 27 |
|
36 | 28 | # Data interchange
|
37 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#application/(atom|rdf|rss)\+xml#i"> |
38 |
| - Header merge Cache-Control "public, stale-while-revalidate" |
39 |
| - </ElseIf> |
| 29 | + Header merge Cache-Control "public, stale-while-revalidate" "expr=%{CONTENT_TYPE} =~ m#application/(atom|rdf|rss)\+xml#i" |
40 | 30 |
|
41 | 31 | # Documents
|
42 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#text/(html|markdown|calendar)#i"> |
43 |
| - Header merge Cache-Control "private, must-revalidate" |
44 |
| - </ElseIf> |
| 32 | + Header merge Cache-Control "private, must-revalidate" "expr=%{CONTENT_TYPE} =~ m#text/(html|markdown|calendar)#i" |
45 | 33 |
|
46 | 34 | # Data
|
47 |
| - <ElseIf "%{CONTENT_TYPE} =~ m#json|xml#i"> |
48 |
| - Header merge Cache-Control "no-cache" |
49 |
| - </ElseIf> |
| 35 | + Header merge Cache-Control "no-cache" "expr=%{CONTENT_TYPE} =~ m#json|xml#i" |
50 | 36 |
|
51 | 37 | # Default
|
52 |
| - <Else> |
53 |
| - Header merge Cache-Control "public, immutable, stale-while-revalidate" |
54 |
| - </Else> |
| 38 | + # Header merge Cache-Control "public, immutable, stale-while-revalidate" "expr=%{CONTENT_TYPE}" |
55 | 39 |
|
56 | 40 | </IfModule>
|
0 commit comments