Add CORS for texture routes

Fixes #173

Signed-off-by: cat <cat@plan9.rocks>
This commit is contained in:
cat 2025-06-21 15:11:30 +00:00
parent 8ff0a07efc
commit 509e139e75
No known key found for this signature in database
GPG Key ID: 3D35A815A616B3CB

View File

@ -26,6 +26,7 @@ import (
"os"
"path"
"regexp"
"strings"
"time"
)
@ -176,7 +177,7 @@ func (app *App) MakeServer() *echo.Echo {
return !Contains([]string{
DRASL_API_PREFIX + "/swagger.json",
DRASL_API_PREFIX + "/openapi.json",
}, c.Path())
}, c.Path()) && !strings.HasPrefix(c.Path(), "/web/texture/")
},
}))