Use cors middleware.

This commit is contained in:
FireMasterK 2022-02-23 11:23:14 +00:00
parent 0a8e60e1a6
commit 422e1a3d1d
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import (
"time"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/etag"
"github.com/google/go-github/v42/github"
"golang.org/x/oauth2"
@ -154,6 +155,7 @@ func main() {
go monitorInstances()
app := fiber.New()
app.Use(cors.New())
app.Use(etag.New())
app.Get("/", func(c *fiber.Ctx) error {