Skip to content

🐛 [Bug]: version v2.52.2 up to v2.52.3 , cors error #2936

@febelery

Description

@febelery

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:

  1. Go to '....'
  2. Click on '....'
  3. Do '....'
  4. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions