Skip to content

Commit 7082150

Browse files
committed
Merge remaining commits from Gitlab repo
1 parent 6c58e50 commit 7082150

File tree

6 files changed

+36
-3
lines changed

6 files changed

+36
-3
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Pothi Kalimuthu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ There are multiplpe advantages of using this repo as your go-to nginx configurat
3737
+ Mitigate [httpoxy](https://httpoxy.org/) vulnerability.
3838
+ [HSTS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) support.
3939
+ All hidden and backup files are forbidden by default.
40+
+ Passes most security features in [Sonar Scanner](https://sonarwhal.com/scanner/).
4041

4142
## Compatibility
4243

conf.d/common.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ map $status $loggable {
4242
}
4343

4444
# -------------------------------------------------------------------
45+
46+
# https://jdh8.github.io/charset-for-text-on-nginx/
47+
map $sent_http_content_type $charset {
48+
~^text/ utf-8;
49+
}
50+
51+
charset $charset;
52+
charset_types *;
53+
54+
# -------------------------------------------------------------------

globals/assets.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ location ~ \.(?:css|js)$ {
1111
expires max;
1212
log_not_found off;
1313
access_log off;
14+
add_header X-Content-Type-Options "nosniff";
1415
}
1516

1617
# Web fonts needs some special care

globals/restrictions.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ location /.git { deny all; }
66
location /.htaccess { deny all; }
77
location /.htpasswd { deny all; }
88
location /.user.ini { deny all; }
9-
# all remaining dot files
9+
# this actually covers every dot file, except what follows below it (ex: CertBot)
1010
location ~ ^/\. { deny all; }
1111

1212
# but allow CertBot - see http://stackoverflow.com/a/34262192
13-
location ^~ /.well-known {
13+
location ^~ /.well-known/acme-challenge {
1414
auth_basic off;
1515
try_files $uri =404;
1616
expires -1;

globals/wprocket.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ location / {
5151

5252
location @mobileaccess {
5353
# try_files $uri $uri/ /index.php$is_args$args;
54-
try_files "/wp-content/cache/wp-rocket/$host${uri}index$wpsc_https-mobile.html" $uri $uri/ /index.php$is_args$args;
54+
try_files "/wp-content/cache/wp-rocket/$host${uri}index-mobile$wpsc_https.html" $uri $uri/ /index.php$is_args$args;
5555

5656
add_header "X-Cache" "HIT - Mobile - WP Rocket Cache";
5757
# include "globals/hsts.conf";

0 commit comments

Comments
 (0)