Files
atom/config.toml
2023-01-30 19:33:24 +08:00

105 lines
2.1 KiB
TOML

[App]
Mode = "debug"
[Storage]
Driver = "local"
[Storage.Local]
Path = "./storage"
[Storage.AwsS3]
Bucket = "bucket"
Region = "region"
Endpoint = "endpoint"
DisableSSL = false
SecretID = ""
SecretKey = ""
BaseURL = ""
Path = ""
S3ForcePathStyle = false
[Storage.AliYunOSS]
Bucket = "bucket"
Region = "region"
Endpoint = "endpoint"
AccessKeyID = ""
AccessKeySecret = ""
BaseURL = ""
Path = ""
[Http]
Static = "./dist"
Https = false
HttpsCert = ""
HttpKey = ""
Port = 9800
[Http.Captcha]
KeyLong = 6
Width = 240
Height = 80
OpenCaptcha = 0
OpenCaptchaTimeout = 3600
[Http.JWT]
SigningKey = "f3a0ed18-3eea-4bc9-b440-d56c3bb77bd8"
ExpiresTime = "168h" # 7 days
BufferTime = "24h"
Issuer = "AtomFramework"
[Http.Cors]
# 跨域配置
# 需要配合 server/initialize/router.go#L32 使用
# 放行模式: Allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
Mode = "strict-whitelist"
[[Http.Cors.Whitelist]]
AllowOrigin = "example1.com"
AllowHeaders = "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id"
AllowMethods = "POST, GET"
ExposeHeaders = "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type"
AllowCredentials = true
[[Http.Cors.Whitelist]]
AllowOrigin = "example2.com"
AllowHeaders = "content-type"
AllowMethods = "GET, POST"
ExposeHeaders = "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type"
AllowCredentials = true
[Log]
Driver = "zap"
Level = "debug"
[Log.Zap]
Prefix = "[github.com/flipped-aurora/gin-vue-admin/server]"
Format = "console"
Director = "log"
EncodeLevel = "LowercaseColorLevelEncoder"
StacktraceKey = "stacktrace"
MaxAge = 0
ShowLine = true
LogInConsole = true
[Database]
Driver = "mysql"
[Database.MySQL]
Host = "localhost"
Port = 3306
Database = "demos11"
Username = "root"
Password = "root"
Prefix=""
Singular = false
MaxIdleConns = 10
MaxOpenConns = 200
Engine = "InnoDB"
[Database.Redis]
Host = "localhost"
Port = 3306
Database = 0
Username = ""
Password = ""