corsica alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view corsica alternatives based on common mentions on social networks and blogs.
-
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
plug_canonical_host
PlugCanonicalHost ensures that all requests are served by a single canonical host. -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json -
phoenix_html_simplified_helpers
Some helpers for phoenix html( truncate, time_ago_in_words, number_with_delimiter, url_for, current_page? )
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of corsica or a related project?
Popular Comparisons
README
Corsica
Corsica is a plug and a DSL for handling CORS requests. Documentation can be found online.
(I had to include a nice pic because, let's be honest, CORS requests aren't the
most fun thing in the world, are they?)
Features
- Is compliant with the W3C CORS specification
- Provides both low-level CORS utilities as well as high-level facilities (like a built-in plug and a CORS-focused router)
- Handles preflight requests like a breeze
- Never sends any CORS headers if the CORS request is not valid (smaller requests, yay!)
Installation
Add the :corsica
dependency to your project's mix.exs
:
defp deps do
[
{:plug, "~> 1.0"},
{:corsica, "~> 1.0"}
]
end
and then run $ mix deps.get
.
Overview
You can use Corsica both as a plug as well as a router generator. To use it as a plug, just plug it into your plug pipeline:
defmodule MyApp.Endpoint do
plug Logger
plug Corsica, origins: "http://foo.com"
plug MyApp.Router
end
To gain finer control over which resources are CORS-enabled and with what
options, you can use the Corsica.Router
module:
defmodule MyApp.CORS do
use Corsica.Router,
origins: ["http://localhost", ~r{^https?://(.*\.)?foo\.com$}],
allow_credentials: true,
max_age: 600
resource "/public/*", origins: "*"
resource "/*"
end
defmodule MyApp.Endpoint do
plug Logger
plug MyApp.CORS
plug MyApp.Router
end
This is only a brief overview of what Corsica can do. To find out more, head to the online documentation.
Common issues
Note that Corsica is compliant with the W3C CORS specification, which means CORS
response headers are not sent for invalid CORS requests. The documentation goes
into more detail about this, but it's worth noting so that the first impression
is not that Corsica is doing nothing. One common pitfall is not including CORS
request headers in your requests: this makes the request an invalid CORS
request, so Corsica won't add any CORS response headers. Be sure to add at least
the Origin
header:
curl localhost:4000 -v -H "Origin: http://foo.com"
There is a dedicated page in the documentation that covers some of the common issues with CORS (and Corsica in part).
Contributing
If you find a bug, something unclear (including in the documentation!) or a behaviour that is not compliant with the latest revision of the official CORS specification, please open an issue on GitHub.
If you want to contribute to code or documentation, fork the repository and then
open a Pull Request
(how-to). Before
opening a Pull Request, make sure all the tests passes by running $ mix test
in your shell. If you're contributing to documentation, you can preview the
generated documentation locally by running:
mix docs
Documentation will be generated in the doc/
directory.
License
MIT © 2015 Andrea Leopardi, see the [license file](LICENSE.txt).
*Note that all licence references and agreements mentioned in the corsica README section above
are relevant to that project's source code only.