ResourceID v1.0.0 ResourceID View Source

REST endpoints without PII in URLs.

Quick Setup

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:

plug ResourceID, prefix: "x-resource-"