mirror of
https://github.com/unmojang/drasl.git
synced 2025-09-10 15:48:14 -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"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -176,7 +177,7 @@ func (app *App) MakeServer() *echo.Echo {
|
|||||||
return !Contains([]string{
|
return !Contains([]string{
|
||||||
DRASL_API_PREFIX + "/swagger.json",
|
DRASL_API_PREFIX + "/swagger.json",
|
||||||
DRASL_API_PREFIX + "/openapi.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