Commit 081f0eb6 authored by nanahira's avatar nanahira

docs

parent a341564c
Pipeline #15614 passed with stages
in 7 minutes and 34 seconds
......@@ -36,3 +36,4 @@ lerna-debug.log*
/data
/output
/config.yaml
/test
# nginx-proxy
Nginx with only env var conf
\ No newline at end of file
Nginx with only env var conf.
## Variables
### Site
Site variables should be followed after `SITE_<domain>_`.
- `SITE_mycard.moe` Site and origin. eg. `SITE_mycard.moe=http://localhost:3000`
- `PORT`
- `HTTPS` Enable HTTPS and specify cert.
- `HTTPS_NOREDIR` Disable redirect to HTTPS.
- `HSTS` Enable HSTS.
- `HEADER` Extra header. eg. `SITE_mycard.moe_HEADER_FOO=bar`
- `MINIO` Enable minio mode.
- `DISABLE_TOP` Disable / access.
- `NO_VERIFY_CERTS`
- `NO_BUFFER` Add `proxy_buffering off;` to nginx conf.
- `NO_CACHE` Add `proxy_cache off;` to nginx conf.
- `TIMEOUT` in seconds.
- `SERVER_EXTRA` Extra entry in `server`.
- `LOCATION_EXTRA` Extra entry in `location`.
### Global
- `PURGE_ALLOWED` IPs allowed to do PURGE request.
- `REAL_IP` IPs allowed to send `X-Forwarded-For` header.
- `LIMIT_RATE` `LIMIT_BURST` `MAX_CACHE_SIZE` in original format. eg. `LIMIT_RATE=10m`
- `HTTP_EXTRA` Extra entry in `http` section.
\ No newline at end of file
......@@ -53,14 +53,14 @@ function getSiteData(
if (httpsCert) {
https = {
cert: httpsCert,
ports: parser.getArrayNumber('HTTPS_PORTS') || [443],
ports: parser.getArrayNumber('HTTPS_PORT') || [443],
redirect: !parser.getBoolean('HTTPS_NOREDIR'),
hsts: parser.getBoolean('HSTS'),
};
}
return {
domains: domain.split('+'),
ports: parser.getArrayNumber('PORTS') || [80],
ports: parser.getArrayNumber('PORT') || [80],
https,
headers: Object.entries(parser.getDict('HEADER')).map(([name, value]) => ({
name: name.replace(/_/g, '-'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment