mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Merge branch 'master' of https://github.com/cloudreve/Cloudreve
This commit is contained in:
@@ -344,7 +344,6 @@ func (handler Driver) Token(ctx context.Context, TTL int64, key string) (seriali
|
|||||||
map[string]string{"bucket": handler.Policy.BucketName},
|
map[string]string{"bucket": handler.Policy.BucketName},
|
||||||
[]string{"starts-with", "$key", savePath},
|
[]string{"starts-with", "$key", savePath},
|
||||||
[]string{"starts-with", "$success_action_redirect", apiURL.String()},
|
[]string{"starts-with", "$success_action_redirect", apiURL.String()},
|
||||||
[]string{"starts-with", "$name", ""},
|
|
||||||
[]string{"starts-with", "$Content-Type", ""},
|
[]string{"starts-with", "$Content-Type", ""},
|
||||||
map[string]string{"x-amz-algorithm": "AWS4-HMAC-SHA256"},
|
map[string]string{"x-amz-algorithm": "AWS4-HMAC-SHA256"},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ type SiteConfig struct {
|
|||||||
ReCaptchaKey string `json:"captcha_ReCaptchaKey"`
|
ReCaptchaKey string `json:"captcha_ReCaptchaKey"`
|
||||||
CaptchaType string `json:"captcha_type"`
|
CaptchaType string `json:"captcha_type"`
|
||||||
TCaptchaCaptchaAppId string `json:"tcaptcha_captcha_app_id"`
|
TCaptchaCaptchaAppId string `json:"tcaptcha_captcha_app_id"`
|
||||||
|
RegisterEnabled bool `json:"registerEnabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type task struct {
|
type task struct {
|
||||||
@@ -83,6 +84,7 @@ func BuildSiteConfig(settings map[string]string, user *model.User) Response {
|
|||||||
ReCaptchaKey: checkSettingValue(settings, "captcha_ReCaptchaKey"),
|
ReCaptchaKey: checkSettingValue(settings, "captcha_ReCaptchaKey"),
|
||||||
CaptchaType: checkSettingValue(settings, "captcha_type"),
|
CaptchaType: checkSettingValue(settings, "captcha_type"),
|
||||||
TCaptchaCaptchaAppId: checkSettingValue(settings, "captcha_TCaptcha_CaptchaAppId"),
|
TCaptchaCaptchaAppId: checkSettingValue(settings, "captcha_TCaptcha_CaptchaAppId"),
|
||||||
|
RegisterEnabled: model.IsTrueVal(checkSettingValue(settings, "register_enabled")),
|
||||||
}}
|
}}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ func SiteConfig(c *gin.Context) {
|
|||||||
"captcha_ReCaptchaKey",
|
"captcha_ReCaptchaKey",
|
||||||
"captcha_type",
|
"captcha_type",
|
||||||
"captcha_TCaptcha_CaptchaAppId",
|
"captcha_TCaptcha_CaptchaAppId",
|
||||||
|
"register_enabled",
|
||||||
)
|
)
|
||||||
|
|
||||||
// 如果已登录,则同时返回用户信息和标签
|
// 如果已登录,则同时返回用户信息和标签
|
||||||
|
|||||||
Reference in New Issue
Block a user