-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-temp.yaml
45 lines (39 loc) · 1.29 KB
/
config-temp.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
44
45
# 应用配置
app:
username: username # 应用用户名
password: password # 应用密码
cookiesFilePath: "zhihu.json" # Cookie 存储文件路径
# 日志配置
logger:
level: "info" # 日志级别: debug/info/warn/error
filename: "./logs/app.log" # 日志文件路径
maxsize: 100 # 单个日志文件最大尺寸,单位:MB
maxage: 7 # 日志文件保留天数
maxbackups: 10 # 保留的旧日志文件个数
compress: true # 是否压缩旧的日志文件
console: true # 是否同时输出到控制台
# HTTP服务器配置
server:
port: ":8080" # 服务监听端口
mode: "debug" # gin运行模式: debug/release/test
readTimeout: 60s # 读取请求超时时间
writeTimeout: 60s # 写入响应超时时间
maxHeaderBytes: 10485760 # 字节数:10MB = 1024 * 1024 * 10
# 受信任的代理服务器IP列表
trustedProxies:
- "127.0.0.1" # 本地回环地址
- "10.0.0.0/8" # 内网地址段
# CORS跨域配置
allowedOrigins: # 允许跨域请求的源
- "*" # * 表示允许所有源
allowedMethods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
- "OPTIONS"
allowedHeaders: # 允许的请求头
- "Origin" # 请求源
- "Content-Type" # 内容类型
- "Accept" # 接受的响应类型
- "Authorization" # 认证信息