mirror of
https://github.com/TeamPiped/instances-api.git
synced 2024-08-14 23:57:19 +00:00
Use cors middleware.
This commit is contained in:
parent
0a8e60e1a6
commit
422e1a3d1d
1 changed files with 2 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue