-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11b0e1d
commit 35d6666
Showing
3 changed files
with
47 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
client_body_timeout 10s; | ||
client_header_timeout 10s; | ||
send_timeout 10s; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
limit_req zone=one burst=5 nodelay; | ||
limit_conn conn_limit_per_ip 10; | ||
|
||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|webp)$ { | ||
expires 4h; | ||
add_header Cache-Control "public, max-age=14400"; | ||
} | ||
|
||
location ~* \.(webp)$ { | ||
expires 4h; | ||
add_header Cache-Control "public, max-age=14400"; | ||
} | ||
|
||
location ~* rocket-loader\.min\.js$ { | ||
expires 2d; | ||
add_header Cache-Control "public, max-age=172800"; | ||
} | ||
|
||
location ~* avatars\.githubusercontent\.com { | ||
expires 5m; | ||
add_header Cache-Control "public, max-age=300"; | ||
} | ||
|
||
location ~* shields\.io { | ||
expires 1d; | ||
add_header Cache-Control "public, max-age=86400"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,5 @@ | ||
http { | ||
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; | ||
limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
client_body_timeout 10s; | ||
client_header_timeout 10s; | ||
send_timeout 10s; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
limit_req zone=one burst=5 nodelay; | ||
limit_conn conn_limit_per_ip 10; | ||
|
||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|webp)$ { | ||
expires 4h; | ||
add_header Cache-Control "public, max-age=14400"; | ||
} | ||
|
||
location ~* \.(webp)$ { | ||
expires 4h; | ||
add_header Cache-Control "public, max-age=14400"; | ||
} | ||
|
||
location ~* rocket-loader\.min\.js$ { | ||
expires 2d; | ||
add_header Cache-Control "public, max-age=172800"; | ||
} | ||
|
||
location ~* avatars\.githubusercontent\.com { | ||
expires 5m; | ||
add_header Cache-Control "public, max-age=300"; | ||
} | ||
|
||
location ~* shields\.io { | ||
expires 1d; | ||
add_header Cache-Control "public, max-age=86400"; | ||
} | ||
} | ||
} | ||
include /etc/nginx/conf.d/*.conf; | ||
} |