feat(subscribe): update subscribe path
This commit is contained in:
parent
621eda41c2
commit
b5c756af35
@ -53,7 +53,7 @@ type Verify struct {
|
||||
|
||||
type SubscribeConfig struct {
|
||||
SingleModel bool `yaml:"SingleModel" default:"false"`
|
||||
SubscribePath string `yaml:"SubscribePath" default:"/api/subscribe"`
|
||||
SubscribePath string `yaml:"SubscribePath" default:"/v1/subscribe/config"`
|
||||
SubscribeDomain string `yaml:"SubscribeDomain" default:""`
|
||||
PanDomain bool `yaml:"PanDomain" default:"false"`
|
||||
UserAgentLimit bool `yaml:"UserAgentLimit" default:"false"`
|
||||
|
||||
@ -74,7 +74,7 @@ func SubscribeHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
func RegisterSubscribeHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) {
|
||||
path := serverCtx.Config.Subscribe.SubscribePath
|
||||
if path == "" {
|
||||
path = "/api/subscribe"
|
||||
path = "/v1/subscribe/config"
|
||||
}
|
||||
router.GET(path, SubscribeHandler(serverCtx))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user