changed CORS configuration

This commit is contained in:
2023-08-14 13:36:38 +00:00
parent df286787ba
commit 9281759baf
4 changed files with 5 additions and 3 deletions
+2
View File
@@ -1 +1,3 @@
*.exe
ncodingapi/ncodingapi
+1 -1
View File
@@ -1,6 +1,6 @@
module ncodingapi
go 1.21.0
go 1.20
require github.com/gofiber/fiber/v2 v2.48.0
+2 -2
View File
@@ -10,13 +10,13 @@ func main() {
app.Use(cors.New(cors.Config{
AllowHeaders: "Origin,Content-Type,Accept,Content-Length,Accept-Language,Accept-Encoding,Connection,Access-Control-Allow-Origin",
AllowOrigins: "*",
AllowOrigins: "http://*, https://*",
AllowCredentials: true,
AllowMethods: "GET,POST,HEAD,PUT,DELETE,PATCH,OPTIONS",
}))
app.Get("/version", func(c *fiber.Ctx) error {
return c.SendString("1.0.0")
return c.SendString("1.0.1")
})
app.Listen(":3800")
Executable
BIN
View File
Binary file not shown.