Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Allow adding custom header to all requests #759

Closed

Description

@kbrooks

At my company, we have a self-hosted sentry instance behind an IAP authentication layer, which makes it impossible to use the Sentry CLI as it exists today. On the old sentry CLI we did this:

export SENTRY_PROJECT="your-project-name"
export CUSTOM_HEADER="SC-LCA-1: ..."

Support for this behavior was added in this PR getsentry/sentry-cli#1077

This doesn't seem to be supported on the new CLI which doesn't support a custom header or a header parameter on the sentry auth login command

sentry auth login  -H "SC-LCA-1: ..."

and the plain command fails with

 ERROR  Failed to initiate device flow                                                                                                                                                          auth.login 1:01:31 PM
  Endpoint: /oauth/device/code/
  Invalid IAP credentials: empty token

Can we add support for custom headers to the new cli?

Activity

  1. BYK commented on Apr 15, 2026

    @BYK
    Member

    @kbrooks thanks for the issue! Looking into how we can get this done.

  2. added 2 commits that reference this issue on Apr 15, 2026
    8c2e231
    655dd90
  3. BYK commented on Apr 16, 2026

    @BYK
    Member

    @kbrooks LMK if the design in #761 would work for you and I'll merge it

  4. kbrooks commented on Apr 16, 2026

    @kbrooks
    Author

    This will work for us. Thanks for the quick fix

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