mirror of
https://github.com/unmojang/drasl.git
synced 2025-08-03 02:46:03 -04:00
Add CORS for texture routes
Fixes #173 Signed-off-by: cat <cat@plan9.rocks>
This commit is contained in:
parent
8ff0a07efc
commit
5a0deebf89
3
main.go
3
main.go
@ -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/")
|
||||
},
|
||||
}))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user