Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit f4d09de

Browse files
committed
Add CORS headers
1 parent 1a2a396 commit f4d09de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"time"
1515

1616
"github.com/gofiber/fiber/v2"
17+
"github.com/gofiber/fiber/v2/middleware/cors"
1718
)
1819

1920
func main() {
@@ -26,6 +27,7 @@ func main() {
2627
}
2728

2829
app := fiber.New()
30+
app.Use(cors.New())
2931

3032
app.Get("/info", func(c *fiber.Ctx) error {
3133
target := c.Query("url")

0 commit comments

Comments
 (0)