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 committed by Evan Goode
parent 8ff0a07efc
commit 5a0deebf89

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/")
},
}))