diff --git a/services/httpapiv1/service.go b/services/httpapiv1/service.go index ad6451e..0885d81 100644 --- a/services/httpapiv1/service.go +++ b/services/httpapiv1/service.go @@ -7,6 +7,7 @@ import ( "git.aiterp.net/lucifer3/server/events" "git.aiterp.net/lucifer3/server/services/uistate" "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" "log" "net" "sync" @@ -18,6 +19,7 @@ func New(addr string) (lucifer3.Service, error) { e := echo.New() e.HideBanner = true e.HidePort = true + e.Use(middleware.CORS()) e.GET("/state", func(c echo.Context) error { svc.mu.Lock()