Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sub/subController.go')
-rw-r--r--sub/subController.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/sub/subController.go b/sub/subController.go
index 9afbc8da..3ee46384 100644
--- a/sub/subController.go
+++ b/sub/subController.go
@@ -9,6 +9,7 @@ import (
)
type SUBController struct {
+ subTitle string
subPath string
subJsonPath string
subEncrypt bool
@@ -30,9 +31,11 @@ func NewSUBController(
jsonNoise string,
jsonMux string,
jsonRules string,
+ subTitle string,
) *SUBController {
sub := NewSubService(showInfo, rModel)
a := &SUBController{
+ subTitle: subTitle,
subPath: subPath,
subJsonPath: jsonPath,
subEncrypt: encrypt,
@@ -82,7 +85,7 @@ func (a *SUBController) subs(c *gin.Context) {
// Add headers
c.Writer.Header().Set("Subscription-Userinfo", header)
c.Writer.Header().Set("Profile-Update-Interval", a.updateInterval)
- c.Writer.Header().Set("Profile-Title", subId)
+ c.Writer.Header().Set("Profile-Title", a.subTitle)
if a.subEncrypt {
c.String(200, base64.StdEncoding.EncodeToString([]byte(result)))
@@ -116,7 +119,7 @@ func (a *SUBController) subJsons(c *gin.Context) {
// Add headers
c.Writer.Header().Set("Subscription-Userinfo", header)
c.Writer.Header().Set("Profile-Update-Interval", a.updateInterval)
- c.Writer.Header().Set("Profile-Title", subId)
+ c.Writer.Header().Set("Profile-Title", a.subTitle)
c.String(200, jsonSub)
}