Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

cache static resources 1 day #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions content/extra/htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

</IfModule>

# Disable directory listing
Options -Indexes
<ifModule mod_headers.c>
# Cache static static resources 1 day
<FilesMatch "\.(css|gif|ico|js|jpeg|jpg|pdf|png|svg|ttf|woff|woff2)$">
Header set Cache-Control "max-age=86400"
</FilesMatch>

# Set HSTS headers to enforce TLS
Header set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
</ifModule>

# Disable directory listing
Options -Indexes