myxce/src/frontend/apiserver/config/app.yaml
2026-07-21 08:24:44 +00:00

85 lines
1.8 KiB
YAML

app:
name: "xce_apiserver"
runmode: "dev" # debug, release, test
http_port: 8080
version: "1.0.0"
security:
https:
enabled: false
port: 8443
cert_file: "config/ssl/server.crt"
key_file: "config/ssl/server.key"
authentication:
token:
type: "jwt"
secretKey: "xce-api-key"
token_expire_time: 86400 # 1 day
rate_limit:
global:
rate: 1000 # requests per second
burst: 2000
window: second # second, minute
endpoints:
/xce/v1/auth/logon:
rate: 100 # requests per minute
burst: 200
window: second
/xce/v1/cluster:
rate: 1000 # requests per second
burst: 2000
window: second
/xce/v1/jobs/*:
rate: 1000 # requests per second
burst: 2000
window: second
/xce/v1/files/*:
rate: 1000 # requests per second
burst: 2000
window: second
whitelist:
#- "127.0.0.1"
#- "::1"
#- "172.24.100.0/24"
#- "172.29.6.0/24"
#- "192.168.0.0/16"
#- "172.19.0.0/16"
- "0.0.0.0/0"
- "::/0"
file_upload:
max_size: 100 MB # maximum file size, support unit MB or GB
allowed_types:
- "application/x-tar"
- "application/zip"
- "application/x-gzip"
- "application/x-bzip2"
- "application/x-xz"
- "application/gzip"
- "application/bzip2"
- "application/x-xz"
- "application/octet-stream"
- "application/x-zip-compressed"
disallowed_types: # disallowed file types
- "application/x-msdownload" # .exe file
- "application/javascript" # .js file
job:
max_array_size: 1000 # default max array size for job submission
cache:
refresh_interval: 30 # seconds, available values: 1-300
cors:
enabled: true
allowed_origins:
- "*"
backend:
address: "localhost"
port: 9901
from: "xce_apiserver"
key: "keepsecret$"