Browse Source

add cors

beelzebub
Gisle Aune 2 years ago
parent
commit
e1b536e128
  1. 2
      services/httpapiv1/service.go

2
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()

Loading…
Cancel
Save