fix(swagger): do not specify a host (#1930)

In this way the requests are redirected to the host used by the client
to perform the request.
This commit is contained in:
Ettore Di Giacinto 2024-03-30 12:04:41 +01:00 committed by GitHub
parent eab4a91a9b
commit 61e5e6bc36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 4 deletions

View File

@ -51,7 +51,6 @@ func readAuthHeader(c *fiber.Ctx) string {
// @contact.url https://localai.io
// @license.name MIT
// @license.url https://raw.githubusercontent.com/mudler/LocalAI/master/LICENSE
// @host localhost:8080
// @BasePath /
// @securityDefinitions.apikey BearerAuth
// @in header

View File

@ -785,7 +785,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "2.0.0",
Host: "localhost:8080",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "LocalAI API",

View File

@ -13,7 +13,6 @@
},
"version": "2.0.0"
},
"host": "localhost:8080",
"basePath": "/",
"paths": {
"/v1/assistants": {

View File

@ -365,7 +365,6 @@ definitions:
type:
type: string
type: object
host: localhost:8080
info:
contact:
name: LocalAI