From ee9737442fc8c17253b8e9b92ef62490fb5da034 Mon Sep 17 00:00:00 2001 From: workabee <2950914812@qq.com> Date: Mon, 19 Feb 2024 11:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/prod/config.yaml | 2 +- internal/config/app_config.go | 73 ---------------------------------- pkg/service/register_record.go | 2 +- 3 files changed, 2 insertions(+), 75 deletions(-) diff --git a/conf/prod/config.yaml b/conf/prod/config.yaml index b16f94a..5975d69 100644 --- a/conf/prod/config.yaml +++ b/conf/prod/config.yaml @@ -5,7 +5,7 @@ system: port: 9025 key: cert: - is_https: false + is_https: true cron: false key_path: "" cert_path: "" diff --git a/internal/config/app_config.go b/internal/config/app_config.go index 70006de..4907e17 100644 --- a/internal/config/app_config.go +++ b/internal/config/app_config.go @@ -10,79 +10,6 @@ import ( var Data = new(AppConfig) -var ( - AppMode string - HttpPort string - Key string - Cert string - IsHttps bool - RunHttps bool - Domain string - OssDomain string - ServerDM string - Env string - DriverUrl string - AppointUrl string - MaterialHost string - BosAk string - BosSk string - BosBucketName string - BosBaseDir string - BosUrl string - BosHttp string - BosDomain string - ProjectMapDir string - JaegerHost string - JaegerOpen bool - Cron bool - DingAccessToken string - DingUrl string - HolidayID string - HolidaySecret string - HolidaySingleUrl string - HolidayMultiUrl string - - ErpAk string - ErpSk string - - // rabbitmq - RabbitmqUser string - RabbitmqPassword string - RabbitmqHost string - RabbitmqPort int - RabbitmqVhost string - RabbitmqVhostArtwork string - - RedisDB int - RedisAddr string - RedisPw string - - //shop配置 - ShopHost string - //ShopDetail string - - // 地图 - MapAppCode string - // es - ElasticHost string - SendIndexesUrl string - ChatGptHost string - - ApiHost string - - Level string - Filename string - MaxSize string - MaxAge string - MaxBackups string - - YearGiftCheckHost string - Aliyun struct { - AccessKeyId string - AccessKeySecret string - } -) - type AppConfig struct { System struct { Domain string diff --git a/pkg/service/register_record.go b/pkg/service/register_record.go index d94d7dc..7dcfd8a 100644 --- a/pkg/service/register_record.go +++ b/pkg/service/register_record.go @@ -117,7 +117,7 @@ func ExportRegister(c *gin.Context) { return } var httpType string - if config.IsHttps { + if config.Data.System.IsHttps { httpType = model.HttpsType } else { httpType = model.HttpType