-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
47 additions
and
1 deletion.
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,46 @@ | ||
map $sent_http_content_type $expires { | ||
default off; | ||
text/html epoch; # means no cache, as it is not a static page | ||
text/css max; | ||
application/javascript max; | ||
application/woff2 max; | ||
application/octet-stream max; | ||
image/svg+xml 30d; | ||
application/wasm max; | ||
} | ||
|
||
gzip on; | ||
|
||
gzip_vary on; | ||
gzip_proxied any; | ||
gzip_comp_level 6; | ||
gzip_buffers 16 8k; | ||
gzip_min_length 256; | ||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; | ||
add_header 'Access-Control-Allow-Origin' '$http_origin'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,Authorization,User-Agent,User-Identifier,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; | ||
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; | ||
add_header 'Timing-Allow-Origin' '*'; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
location /robots.txt { | ||
return 200 "User-agent: *\nDisallow: /\n"; | ||
} | ||
|
||
location ~ /\. { | ||
deny all; | ||
} | ||
|
||
location / { | ||
expires $expires; | ||
try_files $uri$args $uri$args/ /index.html; | ||
} | ||
} |