Closed akhilgupta1093 closed 1 year ago
What exactly do you mean?
Hi @akhilgupta1093, for now we don't have a dedicated middleware for this purpose yet. But the framework is compatible with native gin middlewares, so you can use e.g. github.com/gin-contrib/cors library:
router := gnext.Router()
corsConfig := cors.DefaultConfig()
corsConfig.AllowCredentials = true
corsConfig.AllowAllOrigins = true
corsConfig.AddAllowHeaders("Authorization")
router.Engine().Use(cors.New(corsConfig))
@akhilgupta1093 Does the problem still exist?
Hi, not for this reason, but I decided not to use this library. Seems like the standard gin middleware should fix the issue, thanks.
How can we resolve a CORS issue?