Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webstronauts/ex_verify_origin

Plug adapter to protect from CSRF attacks by verifying the `Origin` header.
https://github.com/webstronauts/ex_verify_origin

cors csrf elixir phoenix plug

Last synced: about 2 months ago
JSON representation

Plug adapter to protect from CSRF attacks by verifying the `Origin` header.

Awesome Lists containing this project

README

        

# ex_verify_origin

[![Build Status](https://img.shields.io/github/workflow/status/webstronauts/ex_verify_origin/test.svg?style=flat-square)](https://github.com/webstronauts/ex_verify_origin/actions?query=workflow%3Atest)
[![Hex.pm](https://img.shields.io/hexpm/v/ex_verify_origin.svg?style=flat-square)](https://hex.pm/packages/ex_verify_origin)

A Plug adapter to protect from CSRF attacks by verifying the `Origin` header.


Sponsored by The Webstronauts

## Installation

To use VerifyOrigin, you can add it to your application's dependencies.

```elixir
def deps do
[
{:ex_verify_origin, "~> 2.0.0"}
]
end
```

## Usage

You can use the plug within your pipeline.

```elixir
defmodule MyApp.Endpoint do
plug Logger
plug VerifyOrigin
plug MyApp.Router
end
```

To find out more, head to the [online documentation]([https://hexdocs.pm/ex_verify_origin).

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Clone the repository and run `mix test`. To generate docs, run `mix docs`.

## Credits

- [Robin van der Vleuten](https://github.com/robinvdvleuten)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.