- Warn if the
:origins
option is not explicitly provided. This warning will become an error in future Corsica versions.
- Correctly allow "simple methods" and "simple headers" in preflight requests. See the documentation for the
:allow_methods
and:allow_headers
options.
- Allow
:all
as value for the:allow_methods
and:allow_headers
options.
- Drop support for older Elixir versions and require Elixir
~> 1.3
.
- Improve logs.
- Drop support for anonymous functions in the list of
:origins
(it was a mistake to support that in the first place!). - Change the
:log
option from being a log level orfalse
to being a keyword list with log levels orfalse
for each log "type" (for example,:rejected
or:invalid
).
- Add support for
{module, function}
tuples in the list of:origins
(module.function
will be called with the origin as its argument and will decide if such origin is allowed).
- Fix a bug where options given to a
Corsica.Router
weren't properly escaped and caused a "invalid quoted expression" error.
- Fix a typo in a logged message.
- Logging is now more detailed (for example, it logs what header is missing from
:allow_headers
). - Accept options when a module calls
use Corsica.Router
and make these options overridable in eachCorsica.Router.resource/1-2
macro.
- Add support for logging.