-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Bug Description
version v2.52.2 up to v2.52.3 , cors error
version v2.52.2 is correct
How to Reproduce
Steps to reproduce the behavior:
- Go to '....'
- Click on '....'
- Do '....'
- See '....'
Expected Behavior
cors correct
Fiber Version
v2.52.3
Code Snippet (optional)
package main
import "github.com/gofiber/fiber/v2"
import "log"
func main() {
app := fiber.New()
app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
for _, c := range config.Get[[]string]("cors") {
if c == origin {
return true
}
}
return false
},
}))
log.Fatal(app.Listen(":3000"))
}
Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my problem prior to opening this one.
- I understand that improperly formatted bug reports may be closed without explanation.
bytesizedwizard, abdulimr, Vovan-VE and e18r