Skip to content
This repository was archived by the owner on Aug 21, 2022. It is now read-only.

Commit 1d950fc

Browse files
committed
chore(release): 1.0.0 [skip ci]
# 1.0.0 (2020-08-22) ### Bug Fixes * add load-config.yml task ([03cfc3b](03cfc3b)) * add vendor files ([7b6d324](7b6d324)) * nginx conf template path ([f0be945](f0be945)) ### Features * add .gitmodules ([1aa86b0](1aa86b0)) * add galaxy.yml ([6bd5bcd](6bd5bcd))
1 parent ea1bfdd commit 1d950fc

29 files changed

+825
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Nginx Server Configs | MIT License
2+
# https://github.com/h5bp/server-configs-nginx
3+
4+
include h5bp/internet_explorer/x-ua-compatible.conf;
5+
include h5bp/security/referrer-policy.conf;
6+
include h5bp/security/x-content-type-options.conf;
7+
include h5bp/security/x-frame-options.conf;
8+
include h5bp/security/x-xss-protection.conf;
9+
include h5bp/location/security_file_access.conf;
10+
include h5bp/cross-origin/requests.conf;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------------
2+
# | Cross-origin requests |
3+
# ----------------------------------------------------------------------
4+
5+
# Allow cross-origin requests.
6+
#
7+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
8+
# https://enable-cors.org/
9+
# https://www.w3.org/TR/cors/
10+
11+
# (!) Do not use this without understanding the consequences.
12+
# This will permit access from any other website.
13+
# Instead of using this file, consider using a specific rule such as
14+
# allowing access based on (sub)domain:
15+
#
16+
# add_header Access-Control-Allow-Origin "subdomain.example.com";
17+
18+
add_header Access-Control-Allow-Origin $cors;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ----------------------------------------------------------------------
2+
# | Cross-origin resource timing |
3+
# ----------------------------------------------------------------------
4+
5+
# Allow cross-origin access to the timing information for all resources.
6+
#
7+
# If a resource isn't served with a `Timing-Allow-Origin` header that would
8+
# allow its timing information to be shared with the document, some of the
9+
# attributes of the `PerformanceResourceTiming` object will be set to zero.
10+
#
11+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin
12+
# https://www.w3.org/TR/resource-timing/
13+
# https://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
14+
15+
add_header Timing-Allow-Origin "*";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ----------------------------------------------------------------------
2+
# | Custom error messages/pages |
3+
# ----------------------------------------------------------------------
4+
5+
# Customize what Nginx returns to the client in case of an error.
6+
#
7+
# https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page
8+
9+
error_page 404 /404.html;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# ----------------------------------------------------------------------
2+
# | Document modes |
3+
# ----------------------------------------------------------------------
4+
5+
# Force Internet Explorer 8/9/10 to render pages in the highest mode
6+
# available in various cases when it may not.
7+
#
8+
# https://hsivonen.fi/doctype/#ie8
9+
#
10+
# (!) Starting with Internet Explorer 11, document modes are deprecated.
11+
# If your business still relies on older web apps and services that were
12+
# designed for older versions of Internet Explorer, you might want to
13+
# consider enabling `Enterprise Mode` throughout your company.
14+
#
15+
# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
16+
# https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/
17+
# https://msdn.microsoft.com/en-us/library/ff955275.aspx
18+
19+
add_header X-UA-Compatible $x_ua_compatible;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ----------------------------------------------------------------------
2+
# | File access |
3+
# ----------------------------------------------------------------------
4+
5+
# Block access to all hidden files and directories except for the
6+
# visible content from within the `/.well-known/` hidden directory.
7+
#
8+
# These types of files usually contain user preferences or the preserved state
9+
# of a utility, and can include rather private places like, for example, the
10+
# `.git` or `.svn` directories.
11+
#
12+
# The `/.well-known/` directory represents the standard (RFC 5785) path prefix
13+
# for "well-known locations" (e.g.: `/.well-known/manifest.json`,
14+
# `/.well-known/keybase.txt`), and therefore, access to its visible content
15+
# should not be blocked.
16+
#
17+
# https://www.mnot.net/blog/2010/04/07/well-known
18+
# https://tools.ietf.org/html/rfc5785
19+
20+
location ~* /\.(?!well-known\/) {
21+
deny all;
22+
}
23+
24+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
25+
26+
# Block access to files that can expose sensitive information.
27+
#
28+
# By default, block access to backup and source files that may be left by some
29+
# text editors and can pose a security risk when anyone has access to them.
30+
#
31+
# https://feross.org/cmsploit/
32+
#
33+
# (!) Update the `location` regular expression from below to include any files
34+
# that might end up on your production server and can expose sensitive
35+
# information about your website. These files may include: configuration
36+
# files, files that contain metadata about the project (e.g.: project
37+
# dependencies, build scripts, etc.).
38+
39+
location ~* (?:#.*#|\.(?:bak|conf|dist|fla|in[ci]|log|orig|psd|sh|sql|sw[op])|~)$ {
40+
deny all;
41+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ----------------------------------------------------------------------
2+
# | Filename-based cache busting |
3+
# ----------------------------------------------------------------------
4+
5+
# If you're not using a build process to manage your filename version revving,
6+
# you might want to consider enabling the following directives.
7+
#
8+
# To understand why this is important and even a better solution than using
9+
# something like `*.css?v231`, please see:
10+
# https://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
11+
12+
location ~* (.+)\.(?:\w+)\.(bmp|css|cur|gif|ico|jpe?g|m?js|png|svgz?|webp|webmanifest)$ {
13+
try_files $uri $1.$2;
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ----------------------------------------------------------------------
2+
# | SVGZ Compression |
3+
# ----------------------------------------------------------------------
4+
5+
# SVGZ files are already compressed.
6+
# Disable gzip function for `.svgz` files.
7+
8+
location ~* \.svgz$ {
9+
gzip off;
10+
add_header Content-Encoding gzip;
11+
12+
include h5bp/security/x-content-type-options.conf;
13+
include h5bp/security/content-security-policy.conf;
14+
include h5bp/security/referrer-policy.conf;
15+
include h5bp/cross-origin/requests.conf;
16+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ----------------------------------------------------------------------
2+
# | Character encodings |
3+
# ----------------------------------------------------------------------
4+
5+
# Serve all resources labeled as `text/html` or `text/plain` with the media type
6+
# `charset` parameter set to `UTF-8`.
7+
#
8+
# https://nginx.org/en/docs/http/ngx_http_charset_module.html#charset
9+
10+
charset utf-8;
11+
12+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13+
14+
# Update charset_types to match updated mime.types.
15+
# `text/html` is always included by charset module.
16+
# Default: text/html text/xml text/plain text/vnd.wap.wml application/javascript application/rss+xml
17+
#
18+
# https://nginx.org/en/docs/http/ngx_http_charset_module.html#charset_types
19+
20+
charset_types
21+
text/css
22+
text/plain
23+
text/vnd.wap.wml
24+
text/javascript
25+
text/markdown
26+
text/calendar
27+
text/x-component
28+
text/vcard
29+
text/cache-manifest
30+
text/vtt
31+
application/json
32+
application/manifest+json;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ----------------------------------------------------------------------
2+
# | Media types |
3+
# ----------------------------------------------------------------------
4+
5+
# Serve resources with the proper media types (f.k.a. MIME types).
6+
#
7+
# https://www.iana.org/assignments/media-types/media-types.xhtml
8+
# https://nginx.org/en/docs/http/ngx_http_core_module.html#types
9+
10+
include mime.types;
11+
12+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13+
14+
# Default: text/plain
15+
#
16+
# https://nginx.org/en/docs/http/ngx_http_core_module.html#default_type
17+
18+
default_type application/octet-stream;

0 commit comments

Comments
 (0)