update
This commit is contained in:
@@ -21,9 +21,20 @@ server {
|
||||
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization" always;
|
||||
|
||||
# Aggressive caching - 1 year
|
||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
||||
add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT" always;
|
||||
|
||||
# Set proper content type for markdown files
|
||||
location ~* \.md$ {
|
||||
add_header Content-Type "text/markdown; charset=utf-8";
|
||||
# Aggressive caching for markdown too
|
||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
||||
add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT" always;
|
||||
}
|
||||
|
||||
# Enable gzip compression for better performance
|
||||
gzip on;
|
||||
gzip_types text/plain text/css text/markdown application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user