changed CORS configuration
This commit is contained in:
@@ -1 +1,3 @@
|
||||
*.exe
|
||||
ncodingapi/ncodingapi
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module ncodingapi
|
||||
|
||||
go 1.21.0
|
||||
go 1.20
|
||||
|
||||
require github.com/gofiber/fiber/v2 v2.48.0
|
||||
|
||||
|
||||
@@ -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
Binary file not shown.
Reference in New Issue
Block a user