diff --git a/src/docs/docs.go b/src/docs/docs.go index 53401c6..1874f66 100644 --- a/src/docs/docs.go +++ b/src/docs/docs.go @@ -1523,7 +1523,7 @@ type swaggerInfo struct { // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = swaggerInfo{ Version: "1.0", - Host: "127.0.0.1:8080", + Host: "", BasePath: "/", Schemes: []string{}, Title: "Signal Cli REST API", diff --git a/src/docs/swagger.json b/src/docs/swagger.json index 758a23d..edfdbb5 100644 --- a/src/docs/swagger.json +++ b/src/docs/swagger.json @@ -7,7 +7,6 @@ "license": {}, "version": "1.0" }, - "host": "127.0.0.1:8080", "basePath": "/", "paths": { "/v1/about": { diff --git a/src/docs/swagger.yaml b/src/docs/swagger.yaml index 5bcec43..0a3d892 100644 --- a/src/docs/swagger.yaml +++ b/src/docs/swagger.yaml @@ -193,7 +193,6 @@ definitions: status: type: string type: object -host: 127.0.0.1:8080 info: contact: {} description: This is the Signal Cli REST API documentation. diff --git a/src/main.go b/src/main.go index faf2098..8c448ef 100644 --- a/src/main.go +++ b/src/main.go @@ -52,7 +52,6 @@ import ( // @tag.name Search // @tag.description Search the Signal Service. -// @host 127.0.0.1:8080 // @BasePath / func main() { signalCliConfig := flag.String("signal-cli-config", "/home/.local/share/signal-cli/", "Config directory where signal-cli config is stored") @@ -238,7 +237,7 @@ func main() { } } - swaggerUrl := ginSwagger.URL("http://127.0.0.1:" + string(port) + "/swagger/doc.json") + swaggerUrl := ginSwagger.URL("http://" + swaggerIp + ":" + string(port) + "/swagger/doc.json") router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, swaggerUrl)) autoReceiveSchedule := utils.GetEnv("AUTO_RECEIVE_SCHEDULE", "")