Documentation ¶
Overview ¶
Package main integrates the "rs/cors" net/http middleware into Iris. That cors third-party middleware cannot be registered through `iris.FromStd` as a common middleware because it should be injected before the Iris Router itself, it allows/dissallows HTTP Methods too.
This is just an example you can use to run something, based on custom logic, before the Iris Router itself.
In the "routing/custom-wrapper" example we learn how we can acquire and release an Iris context to fire an Iris Handler based on custom logic, before the Iris Router itself. In that example we will fire a net/http handler (the "rs/cors" handler one) instead.
Click to show internal directories.
Click to hide internal directories.