-
Notifications
You must be signed in to change notification settings - Fork 19
/
cfg.json.example
79 lines (79 loc) · 1.58 KB
/
cfg.json.example
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"logger": {
"dir": "logs/",
"level": "DEBUG",
"keepHours": 24
},
"redis": {
"dsn": "127.0.0.1:6379",
"maxIdle": 5,
"connTimeout": 5,
"readTimeout": 5,
"writeTimeout": 5,
"password": ""
},
"internaldb": {
"source": "maxmind",
"auth":false,
"enabled": false,
"db": "internal.mmdb"
},
"db": {
"maxmind": "GeoLite2-City.mmdb",
"qqzengip": "",
"ipdb": ""
},
"source": {
"ipv4": "maxmind",
"ipv6": "maxmind"
},
"autoDownload": {
"enabled": false,
"MaxmindLicenseKey": "",
"targetFilePath": "",
"timeout": 3,
"interval": 24
},
"rateLimit": {
"enabled": false,
"minute": 100,
"hour": 1000,
"day": 10000
},
"sso":{
"enabled":false,
"authExpire":3600,
"type":"oauth2"
},
"oauth2":{
"enabled":false,
"displayName":"统一身份认证",
"redirectURL":"http://localhost/sso/callback/oauth2",
"AuthAddr":"http://cas.example.org/cas/oauth2.0/authorize",
"TokenAddr":"http://cas.example.org/cas/oauth2.0/accessToken",
"UserinfoAddr":"http://cas.example.org/cas/oauth2.0/profile",
"LogoutAddr":"https://cas.example.org/cas/logout?service=http://localhost/",
"scopes":["exmaple-scope"],
"clientId":"client_id",
"clientSecret":"client_secret",
"userinfoIsArray":false,
"userinfoPrefix":"attributes",
"attributes":{
"username":"userId",
"nickname":"name"
}
},
"http": {
"listen": "0.0.0.0:80",
"trustProxy": ["127.0.0.1", "::1"],
"cors": ["http://localhost"],
"x-api-key": "this-is-key",
"sessionOptions": {
"path": "/",
"domain": "localhost",
"maxAge": 3600,
"secure": false,
"httpOnly": true
}
}
}