refactor: move cors handler inside api party

This commit is contained in:
Derrick Hammer 2023-08-15 09:20:54 -04:00
parent 2f64f18e24
commit 37cdbfbc0d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,6 @@ func main() {
app := iris.New()
// Enable Gzip compression for responses
app.Use(iris.Compression)
app.UseRouter(cors.New().Handler())
// Serve static files from the embedded directory at the app's root path
_ = embedFrontend
@ -73,6 +72,8 @@ func main() {
api := app.Party("/api")
v1 := api.Party("/v1")
api.UseRouter(cors.New().Handler())
tusHandler := tus.Init()
// Register the AccountController with the MVC framework and attach it to the "/api/account" path