-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Labels
[Type] DocumentationImprovements or additions to documentationImprovements or additions to documentation[Type] EnhancementNew feature or requestNew feature or request
Description
Just dropping the config I used for an Nginx box, few of these would probably be good for self-hosting docs once that's more realistic in the future.
location ~* .wasm$ {
types {
application/wasm wasm;
}
}
location ~* .data$ {
types {
application/octet-stream data;
}
}
location /scope:.* {
rewrite ^scope:.*?/(.*)$ $1 last;
}
# Enable Multiviews equivalent
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
# Add gzip encoding for .gz files
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# Remove ETag and set Cache-Control for index.html
location ~* ^/index\.html$ {
add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "Wed, 11 Jan 1984 05:00:00 GMT";
}
# Set Access-Control-Allow-Origin and remove ETag, set Cache-Control for specific files
location ~* ^/(index\.js|blueprint-schema\.json|wp-cli\.phar)$ {
add_header Access-Control-Allow-Origin "*";
add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "Wed, 11 Jan 1984 05:00:00 GMT";
}adamziel, eliot-akira and brandonpayton
Metadata
Metadata
Assignees
Labels
[Type] DocumentationImprovements or additions to documentationImprovements or additions to documentation[Type] EnhancementNew feature or requestNew feature or request