-
Notifications
You must be signed in to change notification settings - Fork 5
/
server.yaml
43 lines (43 loc) · 922 Bytes
/
server.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# ip:port
listen: ":80"
# service path
path: .
# username:password
auth: ""
# read header timeout
timeout: 1m
# deny directory request
deny: false
# https config
certificate:
# domain name
domain: ""
# cert file path
cert: ""
# key file path
key: ""
# log
log:
logger:
# https://github.com/natefinch/lumberjack?tab=readme-ov-file#type-logger
filename: "log.txt"
maxsize: 100
maxage: 1
maxbackups: 10
localtime: true
compress: false
# custom log template
template: |
Time: {{time "2006-01-02 15:04:05"}}
TimeUnix: {{time "Unix"}}
{{- with .req}}
Method: {{.Method}}
RemoteAddr: {{.RemoteAddr}}
Referer: {{index .Header "Referer"}}
X-Real-Ip: {{index .Header "X-Real-Ip"}}
X-Forwarded-For: {{index .Header "X-Forwarded-For"}}
ContentLength: {{.ContentLength}}
Host: {{.Host}}
RequestURI: {{.RequestURI}}
URL: {{.URL}}
{{end}}