mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 06:25:00 +00:00
fix(routes): do not gate generated artifacts via key (#4971)
fix(routes): do not gate generated images via key We generate unique uris for images. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
1cd98062e5
commit
1331129485
2 changed files with 8 additions and 8 deletions
|
@ -153,6 +153,14 @@ func API(application *application.Application) (*fiber.App, error) {
|
|||
Browse: true,
|
||||
}))
|
||||
|
||||
if application.ApplicationConfig().ImageDir != "" {
|
||||
router.Static("/generated-images", application.ApplicationConfig().ImageDir)
|
||||
}
|
||||
|
||||
if application.ApplicationConfig().AudioDir != "" {
|
||||
router.Static("/generated-audio", application.ApplicationConfig().AudioDir)
|
||||
}
|
||||
|
||||
// Auth is applied to _all_ endpoints. No exceptions. Filtering out endpoints to bypass is the role of the Filter property of the KeyAuth Configuration
|
||||
router.Use(v2keyauth.New(*kaConfig))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue