-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.toml.example
51 lines (45 loc) · 1.9 KB
/
config.toml.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
[site_info]
# 运行环境: local(本地); test(测试); beta(预生产); release(正式)
env = "local"
# http端口
http_port = "8088"
[jwt]
# 密钥,随机字符串
secret = "secret_strings_xxxxxxxxxxxxxxxxxx"
# token生效时间
expire = 360000000
[error]
# 错误堆栈记录层数
error_stack_layer = 3
# 调用错误的时候,错误日志持久化,如果为空,则不持久化,如果设置了,则默认持久化到文件.
# 同时可以自定义持久化存储器,具体参考: https://github.com/gohouse/e
error_log_file = "error.log"
[casbin_model]
# [request_definition]
r = "sub, obj, act"
# [policy_definition]
p = "sub, obj, act"
# [role_definition]
g = "_, _"
# [policy_effect]
e = "some(where (p.eft == allow))"
# [matchers]
m = "g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act"
# 阿里云国内短信配置 https://help.aliyun.com/document_detail/112150.html?spm=a2c4g.11186623.6.655.20cb50a4cD4nSE
[AliyunOptions]
AccessKeyId = "LTAI4Fxxxxxxxxxxxxxx"
AccessSecret = "U4UWWa3xxxxxxxxxxxx"
SignName = "xxx科技公司"
TemplateCode = "SMS_1800000"
# Twilio国际短信服务商配置 https://www.twilio.com/
[TwilioOptions]
AccessKeyId = "ACxxxxxxxxxxxxxxxxxxxxxxxxxx"
AccessSecret = "a18xxxxxxxxxxxxxxxxxxxxx"
From = "+12000000000" # 发送服务号,这个是收费的,不像国内短信服务商,随机号码
Template = "您的验证码是: %s" # 短信模板,这个模板比较自由,随意定制
# 阿里云oss https://help.aliyun.com/document_detail/32145.html?spm=a2c4g.11186623.2.26.46a91c62ssmNU1#concept-32145-zh
[AliyunOSS]
AccessKeyId = "LTAI4Fxxxxxxxxxxxxxx"
AccessSecret = "U4UWWa3xxxxxxxxxxxx"
Endpoint = "oss-cn-hongkong.aliyuncs.com" # 服务节点,示例是香港,杭州就把hongkong改成hangzhou,具体参考官网
DefaultBucket = "xxxxx" # xxxxxx 为buckets名字