Skip to content

Support for Custom Request Headers#37

Open
Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:chore/authentication
Open

Support for Custom Request Headers#37
Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:chore/authentication

Conversation

@Sano7707

Copy link
Copy Markdown

Summary

This PR adds support for passing custom HTTP request headers (for example, Authorization tokens or custom user/session headers) to the Trino query client and schema providers.

Motivation

In authenticated or proxy-secured Trino environments, requests often require authentication tokens or identity-related headers. Previously, these headers could not be configured through the UI component, making it difficult to integrate with secured deployments.

This change enables host applications to provide custom headers through the main QueryEditor component. The supplied headers are propagated to:

  • Query execution requests
  • Schema and catalog discovery requests

When no custom headers are provided, the client maintains the existing behavior and falls back to the default header:

X-Trino-User: system

Example Usage

import { QueryEditor } from 'trino-query-ui';

function App() {
  return (
    <QueryEditor
      height={800}
      requestHeaders={{
        Authorization: 'Bearer your-jwt-token-here',
        'X-Trino-User': 'custom-user-context',
      }}
    />
  );
}

@cla-bot

cla-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant