- Fixes
- Match for exact origin only (thanks @somlor and @JordanAdams).
- Add Vary to response header (thanks @linjunpop).
- Fixes
- Remove cowboy dependency. Plug should be server-agnostic and this plug does not need cowboy. Thanks to @hauleth and @ewitchin for making me aware.
As I changed dependency this is a minor release. I don't anticipate any regressions tho.
- Fixes
- Add method parens to suppress Elixir 1.4.0 warnings (thanks @seivan).
- Enhancements
- Support regex for
origin
(thanks @somlor)
- Support regex for
- Enhancements
- Allow client to set
allow-headers
by sendingrequest-headers
when using a wildcard.
- Allow client to set
This enhancement is brought to you by @arathunku
- Fixes
- Return "null" instead of null when no origin matches.
Many thanks to @somlor for the fix!
- Enhancements
- Allow multiple origins. When configuring you can now pass a list for
origins
(plug: CORSPlug, origin: ~w(example1.com example2.com)
).
- Allow multiple origins. When configuring you can now pass a list for
- Fixes
Access-Control-Expose-Headers
now works
Both of these have been brought to you by @jer-k - many thanks!
- Fixes
- Don't override headers. Earlier headers would've been overriden by the CORS Plug. Amazing that this hasn't popped up before...
As this makes a backward-incompatible change (no longer overriding headers this is a new major).
- Enhancements
- Add
Access-Control-Expose-Headers
(thanks @jaketrent)
- Add
- Enhancements
- Add license
- Improve readme (thanks @leighhalliday, @patricksrobertson)
- Simplify travis.yml (thanks @lowks)
- Release plug dependency