Skip to content

Commit

Permalink
Single quotes (better IDE support) and extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleshgrinder committed Apr 22, 2015
1 parent 2397269 commit dbad69e
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 59 deletions.
6 changes: 3 additions & 3 deletions includes/.static-files-none.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

expires -1;
tcp_nodelay off;
try_files $uri =404;
expires -1;
tcp_nodelay off;
try_files $uri =404;
8 changes: 4 additions & 4 deletions includes/.static-files-one-hour.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Cache-Control "public, must-revalidate";
expires 1h;
tcp_nodelay off;
try_files $uri =404;
add_header Cache-Control 'public, must-revalidate';
expires 1h;
tcp_nodelay off;
try_files $uri =404;
12 changes: 6 additions & 6 deletions includes/.static-files-one-month.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Cache-Control "public";
etag off;
expires 1M;
if_modified_since off;
tcp_nodelay off;
try_files $uri =404;
add_header Cache-Control public;
etag off;
expires 1M;
if_modified_since off;
tcp_nodelay off;
try_files $uri =404;
12 changes: 6 additions & 6 deletions includes/.static-files-one-year.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Cache-Control "public";
etag off;
expires 1y;
if_modified_since off;
tcp_nodelay off;
try_files $uri =404;
add_header Cache-Control public;
etag off;
expires 1y;
if_modified_since off;
tcp_nodelay off;
try_files $uri =404;
2 changes: 1 addition & 1 deletion includes/cross-domain-insecure.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Origin *;
3 changes: 2 additions & 1 deletion includes/headers-hsts.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Strict-Transport-Security "max-age=262974383; includeSubdomains; preload" always;
include includes/headers.ngx;
add_header Strict-Transport-Security 'max-age=262974383; includeSubdomains; preload' always;
10 changes: 5 additions & 5 deletions includes/headers.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

add_header Content-Type-Options "nosniff" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Frame-Options "SAMEORIGIN" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Content-Type-Options nosniff always;
add_header X-Content-Type-Options nosniff always;
add_header Frame-Options SAMEORIGIN always;
add_header X-Frame-Options SAMEORIGIN always;
add_header X-XSS-Protection '1; mode=block' always;
2 changes: 1 addition & 1 deletion includes/protect-system-files.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

location ~* "(?:(?:^|/)\.|(?:\.(?:bak|cfg|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$)" {
location ~* '(?:(?:^|/)\.|(?:\.(?:bak|cfg|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$)' {
deny all;
}
26 changes: 13 additions & 13 deletions includes/static-files-hsts.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# server {
# location / {
# include includes/static-files-hsts.conf;
# include includes/static-files-hsts.ngx;
# }
# }
#
Expand All @@ -31,22 +31,22 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

location ~* "\.(?:css|js)" {
include includes/.static-files-one-year.conf;
include includes/headers-hsts.conf;
location ~* '\.(?:css|js)' {
include includes/headers-hsts.ngx;
include includes/.static-files-one-year.ngx;
}

location ~* "\.(?:3gp|cur|eot|gif|htc|ico|jng|jpe?g|mp3|mp4|ogg|ogv|otf|png|svgz?|swf|tiff?|ttc|ttf|wav|webm|webp|woff2?)" {
include includes/.static-files-one-month.conf;
include includes/headers-hsts.conf;
location ~* '\.(?:3gp|cur|eot|gif|htc|ico|jng|jpe?g|mp3|mp4|ogg|ogv|otf|png|svgz?|swf|tiff?|ttc|ttf|wav|webm|webp|woff2?)' {
include includes/headers-hsts.ngx;
include includes/.static-files-one-month.ngx;
}

location ~* "\.(?:rss|atom)" {
include includes/.static-files-one-hour.conf;
include includes/headers-hsts.conf;
location ~* '\.(?:rss|atom)' {
include includes/headers-hsts.ngx;
include includes/.static-files-one-hour.ngx;
}

location ~* "\.(?:manifest|appcache|html?|xml|json)" {
include includes/.static-files-none.conf;
include includes/headers-hsts.conf;
location ~* '\.(?:manifest|appcache|html?|xml|json)' {
include includes/headers-hsts.ngx;
include includes/.static-files-none.ngx;
}
22 changes: 13 additions & 9 deletions includes/static-files.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#
# server {
# location / {
# include includes/static-files.conf;
# include includes/static-files.ngx;
# }
# }
#
Expand All @@ -30,18 +30,22 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

location ~* "\.(?:css|js)" {
include includes/.static-files-one-year.conf;
location ~* '\.(?:css|js)' {
include includes/headers.ngx;
include includes/.static-files-one-year.ngx;
}

location ~* "\.(?:3gp|cur|eot|gif|htc|ico|jng|jpe?g|mp3|mp4|ogg|ogv|otf|png|svgz?|swf|tiff?|ttc|ttf|wav|webm|webp|woff2?)" {
include includes/.static-files-one-month.conf;
location ~* '\.(?:3gp|cur|eot|gif|htc|ico|jng|jpe?g|mp3|mp4|ogg|ogv|otf|png|svgz?|swf|tiff?|ttc|ttf|wav|webm|webp|woff2?)' {
include includes/headers.ngx;
include includes/.static-files-one-month.ngx;
}

location ~* "\.(?:rss|atom)" {
include includes/.static-files-one-hour.conf;
location ~* '\.(?:rss|atom)' {
include includes/headers.ngx;
include includes/.static-files-one-hour.ngx;
}

location ~* "\.(?:manifest|appcache|html?|xml|json)" {
include includes/.static-files-none.conf;
location ~* '\.(?:manifest|appcache|html?|xml|json)' {
include includes/headers.ngx;
include includes/.static-files-none.ngx;
}
2 changes: 1 addition & 1 deletion includes/worker-six-core-with-hyper-threading.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# @license https://www.gnu.org/licenses/agpl-3.0.html AGPLv3
# ----------------------------------------------------------------------------------------------------------------------

worker_processes 6;
worker_processes 6;
worker_cpu_affinity
000001000001000001000001000001000001
000010000010000010000010000010000010
Expand Down
17 changes: 8 additions & 9 deletions nginx.dist.ngx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,14 @@ http {
client_max_body_size 16m;
default_type application/octet-stream;
ignore_invalid_headers on;
include includes/fs-sendfile.conf;
include includes/gzip.conf;
include includes/headers.conf;
include includes/https.conf;
include includes/https-spdy.conf;
include includes/php-fpm-upstream.conf;
include includes/mime-types.conf;
include sites/*.conf;
include sites/*/*.conf;
include includes/fs-sendfile.ngx;
include includes/gzip.ngx;
include includes/headers.ngx;
include includes/https.ngx;
include includes/https-spdy.ngx;
include includes/mime-types.ngx;
include sites/*.ngx;
include sites/*/*.ngx;
index index.html index.htm;
keepalive_disable none;
keepalive_requests 50;
Expand Down

0 comments on commit dbad69e

Please sign in to comment.