Skip to content

Commit

Permalink
add: cors
Browse files Browse the repository at this point in the history
Signed-off-by: Hemanth Krishna <[email protected]>
  • Loading branch information
DarthBenro008 committed Mar 9, 2023
1 parent d3f5b3e commit d1f591e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/base64"
"fmt"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"net/http"
"os/exec"
"strings"
Expand Down Expand Up @@ -37,6 +38,7 @@ func base64Encoder(input []byte) string {

func main() {
app := fiber.New()
app.Use(cors.New())
app.Get("/", func(c *fiber.Ctx) error {
return c.JSON(fiber.Map{
"status": "true",
Expand Down

0 comments on commit d1f591e

Please sign in to comment.