Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assign_as option for Plug.RequestId #1172

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

halostatue
Copy link
Contributor

  • :assign_as - The name of the key that will be used to store the
    discovered or generated request id in conn.private. If not provided,
    the request id will not be stored.

    plug Plug.RequestId, assign_as: :plug_request_id

Resolves: #1171

lib/plug/request_id.ex Outdated Show resolved Hide resolved
@halostatue halostatue force-pushed the plug-request-id-assign_as branch from cefbb65 to f736a1b Compare October 6, 2023 13:40
lib/plug/request_id.ex Outdated Show resolved Hide resolved
- `:assign_as` - The name of the key that will be used to store the
  discovered or generated request id in `conn.private`. If not provided,
  the request id will not be stored.

  ```elixir
  plug Plug.RequestId, assign_as: :plug_request_id
  ```

Resolves: elixir-plug#1171
@halostatue halostatue force-pushed the plug-request-id-assign_as branch from f736a1b to 340c10d Compare October 6, 2023 17:13
@josevalim josevalim merged commit 64087f6 into elixir-plug:main Oct 6, 2023
2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plug.RequestId: put the request_id in :private or :assigns?
3 participants