2024-04-30 19:22:19 +08:00
|
|
|
# zap logger configuration
|
|
|
|
zap:
|
|
|
|
level: info
|
|
|
|
format: console
|
|
|
|
prefix: '[PCM-KUBERNETES] '
|
|
|
|
director: log
|
|
|
|
show-line: true
|
|
|
|
encode-level: LowercaseColorLevelEncoder
|
|
|
|
stacktrace-key: stacktrace
|
|
|
|
log-in-console: true
|
|
|
|
|
|
|
|
# 日志割接
|
|
|
|
rotateLogs:
|
|
|
|
max-size: 5
|
|
|
|
max-backups: 7
|
|
|
|
max-age: 7
|
|
|
|
compress: false
|
|
|
|
|
|
|
|
# system configuration
|
|
|
|
system:
|
|
|
|
env: 'production' # Change to "develop" to skip authentication for development mode
|
|
|
|
host: '0.0.0.0'
|
|
|
|
port: 8082
|
|
|
|
stack: true
|
|
|
|
name: pcm-kubernetes
|
2024-05-28 17:05:59 +08:00
|
|
|
adapter-id: 1792747533609472000
|
2024-04-30 19:22:19 +08:00
|
|
|
core-server-url: http://localhost:8999
|
|
|
|
|
|
|
|
# 跨域配置
|
|
|
|
# 需要配合 server/initialize/router.go#L32 使用
|
|
|
|
cors:
|
|
|
|
mode: whitelist # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
|
|
|
|
whitelist:
|
|
|
|
- allow-origin: example1.com
|
|
|
|
allow-headers: content-type
|
|
|
|
allow-methods: GET, POST
|
|
|
|
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
|
|
|
allow-credentials: true # 布尔值
|
|
|
|
- allow-origin: example2.com
|
|
|
|
allow-headers: content-type
|
|
|
|
allow-methods: GET, POST
|
|
|
|
expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
|
|
|
|
allow-credentials: true # 布尔值
|