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: 7 months ago
JSON representation
Plug adapter to protect from CSRF attacks by verifying the `Origin` header.
- Host: GitHub
- URL: https://github.com/webstronauts/ex_verify_origin
- Owner: webstronauts
- License: mit
- Created: 2020-03-06T19:34:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T07:40:49.000Z (almost 6 years ago)
- Last Synced: 2025-01-29T12:46:02.826Z (over 1 year ago)
- Topics: cors, csrf, elixir, phoenix, plug
- Language: Elixir
- Homepage: https://hexdocs.pm/ex_verify_origin
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ex_verify_origin
[](https://github.com/webstronauts/ex_verify_origin/actions?query=workflow%3Atest)
[](https://hex.pm/packages/ex_verify_origin)
A Plug adapter to protect from CSRF attacks by verifying the `Origin` header.
## 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.