Skip to content

Commit

Permalink
Merge 0fa988f into 864a467
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko authored Nov 23, 2024
2 parents 864a467 + 0fa988f commit c04d675
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func main() {
mylog.Printf("gin运行在%v端口", serverPort)
// 在一个新的goroutine中启动主服务器
go func() {
if serverPort == "443" {
if serverPort == "443" || conf.Settings.ForceSSL {
// 使用HTTPS
crtPath := config.GetCrtPath()
keyPath := config.GetKeyPath()
Expand Down
1 change: 1 addition & 0 deletions structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type Settings struct {
UseSelfCrt bool `yaml:"use_self_crt"`
WebhookPath string `yaml:"webhook_path"`
WebhookPrefixIp []string `yaml:"webhook_prefix_ip"`
ForceSSL bool `yaml:"force_ssl"`
//日志类
DeveloperLog bool `yaml:"developer_log"`
LogLevel int `yaml:"log_level"`
Expand Down
1 change: 1 addition & 0 deletions template/config_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ settings:
key : "" #密钥路径 Apache(crt文件、key文件)示例: "C:\\123.key" \需要双写成\\
webhook_path : "webhook" #webhook监听的地址,默认\webhook
webhook_prefix_ip : [] #默认为空,通过webhook进行签名验证来源,设置时,只允许ip前缀的请求,不验证签名. 2024年11月22日最近的webhookip都是 183.47.105. 开始的.
force_ssl : false #默认当port设置为443时启用ssl,true可以在其他port设置下强制启用ssl.
#日志类
developer_log : false #开启开发者日志 默认关闭
Expand Down

0 comments on commit c04d675

Please sign in to comment.