Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbrw/plug_forwarded_peer
Very simple plug which reads `X-Forwarded-For` or `Forwarded` header according to rfc7239 and fill `conn.remote_ip` with the root client ip.
https://github.com/kbrw/plug_forwarded_peer
Last synced: 3 months ago
JSON representation
Very simple plug which reads `X-Forwarded-For` or `Forwarded` header according to rfc7239 and fill `conn.remote_ip` with the root client ip.
- Host: GitHub
- URL: https://github.com/kbrw/plug_forwarded_peer
- Owner: kbrw
- License: mit
- Created: 2015-06-26T15:36:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-13T14:54:19.000Z (over 1 year ago)
- Last Synced: 2024-04-14T04:09:45.102Z (10 months ago)
- Language: Elixir
- Size: 26.4 KB
- Stars: 24
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Very simple plug which reads X-Forwarded-For or Forwarded header according to RFC7239 and fill conn.remote_ip with the root client ip. (Framework Components)
- fucking-awesome-elixir - plug_forward_peer - Very simple plug which reads X-Forwarded-For or Forwarded header according to RFC7239 and fill conn.remote_ip with the root client ip. (Framework Components)
- awesome-elixir - plug_forward_peer - Very simple plug which reads X-Forwarded-For or Forwarded header according to RFC7239 and fill conn.remote_ip with the root client ip. (Framework Components)
README
Plug ForwardedPeer
=================Very simple plug which reads `X-Forwarded-For` or `Forwarded` header according
to rfc7239 and fill `conn.remote_ip` with the root client ip.## Installation
Add to your list of dependencies in mix.exs:
```
def deps do
[
{:plug_forwarded_peer, "~> 0.1.0"}
]
end
```## Usage
In Phoenix:
```elixir
defmodule MyApp.Endpoint do
use Phoenix.Endpoint, otp_app: :my_app...
plug PlugForwardedPeer
end
```Or in plain elixir:
```elixir
defmodule MyPlug do
use Plug.Builder
plug PlugForwardedPeer
end
```# CONTRIBUTING
Hi, and thank you for wanting to contribute.
Please refer to the centralized informations available at: https://github.com/kbrw#contributing