mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-08 20:42:34 +02:00
update config example, scheme and release readme
This commit is contained in:
parent
d44ce0ee6f
commit
1e97d1230a
3 changed files with 249 additions and 1 deletions
|
@ -30,6 +30,41 @@ entrypoint:
|
|||
status: 403
|
||||
message: "Forbidden"
|
||||
- use: RedirectHTTP
|
||||
# access_log:
|
||||
# buffer_size: 1024
|
||||
# path: /var/log/example.log
|
||||
# filters:
|
||||
# status_codes:
|
||||
# values:
|
||||
# - 200-299
|
||||
# - 101
|
||||
# method:
|
||||
# values:
|
||||
# - GET
|
||||
# host:
|
||||
# values:
|
||||
# - example.y.z
|
||||
# headers:
|
||||
# negative: true
|
||||
# values:
|
||||
# - foo=bar
|
||||
# - baz
|
||||
# cidr:
|
||||
# values:
|
||||
# - 192.168.10.0/24
|
||||
# fields:
|
||||
# headers:
|
||||
# default: keep
|
||||
# config:
|
||||
# foo: redact
|
||||
# query:
|
||||
# default: drop
|
||||
# config:
|
||||
# foo: keep
|
||||
# cookies:
|
||||
# default: redact
|
||||
# config:
|
||||
# foo: keep
|
||||
|
||||
providers:
|
||||
# include files are standalone yaml files under `config/` directory
|
||||
|
|
|
@ -201,6 +201,8 @@
|
|||
|
||||
- **New:** Access Logging (entrypoint and per route), i.e.
|
||||
|
||||
**mount logs directory before setting this**
|
||||
|
||||
```yaml
|
||||
# config.yml
|
||||
entrypoint:
|
||||
|
@ -245,7 +247,64 @@
|
|||
- 10.0.0.0/16
|
||||
```
|
||||
|
||||
**mount logs directory before setting this**
|
||||
To integrate with **goaccess**, currently need to use **caddy** as a file web server. Below should work with `combined` log format.
|
||||
|
||||
```yaml
|
||||
# compose.yml
|
||||
services:
|
||||
app:
|
||||
image: reg.6uo.me/yusing/goproxy
|
||||
...
|
||||
volumes:
|
||||
...
|
||||
- ./logs:/app/logs
|
||||
caddy:
|
||||
image: caddy
|
||||
restart: always
|
||||
labels:
|
||||
proxy.goaccess.port: 80
|
||||
proxy.goaccess.middlewares.request.set_headers.host: goaccess
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- ./logs:/var/www/goaccess:ro
|
||||
depends_on:
|
||||
- goaccess
|
||||
goaccess:
|
||||
image: hectorm/goaccess:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- ./logs:/srv/logs
|
||||
command: > # for combined format
|
||||
/srv/logs/access.log
|
||||
-o /srv/logs/report.html
|
||||
-j 4 # 4 threads
|
||||
--real-time-html
|
||||
--ws-url=<your goaccess url>:443 # i.e. goaccess.my.app:443/ws
|
||||
--log-format='%v %h %^[%d:%t %^] "%r" %s %b "%R" "%u"'
|
||||
```
|
||||
|
||||
Caddyfile
|
||||
|
||||
```caddyfile
|
||||
{
|
||||
auto_https off
|
||||
}
|
||||
|
||||
goaccess:80 {
|
||||
@websockets {
|
||||
header Connection *Upgrade
|
||||
header Upgrade websocket
|
||||
}
|
||||
|
||||
handle @websockets {
|
||||
reverse_proxy goaccess:7890
|
||||
}
|
||||
|
||||
root * /var/www/goaccess
|
||||
file_server
|
||||
rewrite / /report.html
|
||||
}
|
||||
```
|
||||
|
||||
## Fixes
|
||||
|
||||
|
@ -255,4 +314,6 @@
|
|||
- various other small bugs
|
||||
- `realIP` and `cloudflareRealIP` middlewares
|
||||
- prometheus metrics gone after a single route reload
|
||||
- WebUI app links now works when `match_domains` is not set
|
||||
- WebUI config editor now display validation errors properly
|
||||
- upgraded dependencies to the latest
|
||||
|
|
|
@ -445,6 +445,158 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"access_log": {
|
||||
"title": "Access log configuration",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"path": {
|
||||
"title": "Access log path",
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"title": "Access log format",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"common",
|
||||
"combined",
|
||||
"json"
|
||||
]
|
||||
},
|
||||
"buffer_size": {
|
||||
"title": "Access log buffer size in bytes",
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"filters": {
|
||||
"title": "Access log filters",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"cidr": {
|
||||
"title": "CIDR filter",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"negative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"values": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status_codes": {
|
||||
"title": "Status code filter",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"negative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"values": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"method": {
|
||||
"title": "Method filter",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"negative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"values": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"title": "Header filter",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"negative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"values": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"host": {
|
||||
"title": "Host filter",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"negative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"values": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fields": {
|
||||
"title": "Access log fields",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"headers": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"default": {
|
||||
"enum": [
|
||||
"keep",
|
||||
"redact",
|
||||
"drop"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"query": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"default": {
|
||||
"enum": [
|
||||
"keep",
|
||||
"redact",
|
||||
"drop"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cookies": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"default": {
|
||||
"enum": [
|
||||
"keep",
|
||||
"redact",
|
||||
"drop"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue