mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2026-01-06 00:14:29 +01:00
add possibility to specify HTTPS as default scheme in the swagger UI
see #639
This commit is contained in:
@@ -77,7 +77,11 @@ func main() {
|
||||
avatarTmpDir := flag.String("avatar-tmp-dir", "/tmp/", "Avatar tmp directory")
|
||||
flag.Parse()
|
||||
|
||||
docs.SwaggerInfo.Schemes = []string{"http", "https"}
|
||||
if utils.GetEnv("SWAGGER_USE_HTTPS_AS_PREFERRED_SCHEME", "false") == "false" {
|
||||
docs.SwaggerInfo.Schemes = []string{"http", "https"}
|
||||
} else {
|
||||
docs.SwaggerInfo.Schemes = []string{"https", "http"}
|
||||
}
|
||||
|
||||
router := gin.New()
|
||||
router.Use(gin.LoggerWithConfig(gin.LoggerConfig{
|
||||
|
||||
Reference in New Issue
Block a user