Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Allow to set required header values #6

Description

@sobolevn

My use-case is pretty simple: I want to use webhooks with a secret key.
Both parties know this value.

And currently I write this code:

plug PlugRequireHeader, headers: [auth_token: "X-Gitlab-Token"]
plug :verify_auth_token

And then I actually verify it.

So, my proposal is to allow something like:

plug PlugRequireHeader, headers: [auth_token: %{"X-Gitlab-Token" => System.get_env("SECRET_KEY")}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions