cors

command
v12.2.0-alpha9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

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.

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL