mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-26 14:44:15 +00:00
fixed bug in swagger documentation
* use configured SWAGGER_HOST env variable when generating the URL for the swagger documentation file. see #683
This commit is contained in:
parent
85c308302c
commit
60c395d4a8
@ -335,7 +335,12 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
swaggerUrl := ginSwagger.URL("http://" + swaggerIp + ":" + string(port) + "/swagger/doc.json")
|
protocol := "http"
|
||||||
|
if utils.GetEnv("SWAGGER_USE_HTTPS_AS_PREFERRED_SCHEME", "false") == "true" {
|
||||||
|
protocol = "https"
|
||||||
|
}
|
||||||
|
|
||||||
|
swaggerUrl := ginSwagger.URL(protocol + "://" + swaggerHost + "/swagger/doc.json")
|
||||||
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, swaggerUrl))
|
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, swaggerUrl))
|
||||||
|
|
||||||
autoReceiveSchedule := utils.GetEnv("AUTO_RECEIVE_SCHEDULE", "")
|
autoReceiveSchedule := utils.GetEnv("AUTO_RECEIVE_SCHEDULE", "")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user