refactor: move cors handler inside api party
This commit is contained in:
parent
2f64f18e24
commit
37cdbfbc0d
3
main.go
3
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue