https://github.com/ianluites/resource_id
REST endpoints without PII in URLs.
https://github.com/ianluites/resource_id
elixir pii plug
Last synced: 8 days ago
JSON representation
REST endpoints without PII in URLs.
- Host: GitHub
- URL: https://github.com/ianluites/resource_id
- Owner: IanLuites
- License: mit
- Created: 2020-02-15T15:36:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T16:05:51.000Z (over 6 years ago)
- Last Synced: 2025-02-03T00:04:51.802Z (over 1 year ago)
- Topics: elixir, pii, plug
- Language: Elixir
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ResourceID
[](https://hex.pm/packages/resource_id)
[](https://travis-ci.org/IanLuites/resource_id)
[](https://coveralls.io/github/IanLuites/resource_id?branch=master)
[](LICENSE)
REST endpoints without PII in URLs.
## Quick Setup
```elixir
defmodule MyRouter do
use Plug.Router
plug ResourceID
plug :match
plug :dispatch
get "/api/v1/users/:user/email" do
...
end
end
```
## Configuration
### prefix
Prefix all headers with a set string.
This limits header user to only headers that start with the set prefix.
Example:
```elixir
plug ResourceID, prefix: "x-resource-"
```
## Installation
The package can be installed
by adding `resource_id` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:resource_id, "~> 1.0"}
]
end
```
The docs can be found at
[https://hexdocs.pm/resource_id](https://hexdocs.pm/resource_id).
## Changelog
### 1.0.0 (2020-02-15)
Initial release.
## Copyright and License
Copyright (c) 2020, Ian Luites.
ResourceID code is licensed under the [MIT License](LICENSE).