Use cors middleware.
This commit is contained in:
parent
0a8e60e1a6
commit
422e1a3d1d
2
main.go
2
main.go
|
@ -12,6 +12,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||||
"github.com/gofiber/fiber/v2/middleware/etag"
|
"github.com/gofiber/fiber/v2/middleware/etag"
|
||||||
"github.com/google/go-github/v42/github"
|
"github.com/google/go-github/v42/github"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
@ -154,6 +155,7 @@ func main() {
|
||||||
go monitorInstances()
|
go monitorInstances()
|
||||||
|
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
app.Use(cors.New())
|
||||||
app.Use(etag.New())
|
app.Use(etag.New())
|
||||||
|
|
||||||
app.Get("/", func(c *fiber.Ctx) error {
|
app.Get("/", func(c *fiber.Ctx) error {
|
||||||
|
|
Loading…
Reference in New Issue