(relativePath: string)
| 52 | * it must never be cached. |
| 53 | */ |
| 54 | export function cacheControlFor(relativePath: string): string { |
| 55 | const normalized = relativePath.split(path.sep).join('/'); |
| 56 | return normalized.startsWith('assets/') |
| 57 | ? 'public, max-age=31536000, immutable' |
| 58 | : 'no-store'; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Stream a file as the response body. |
no test coverage detected