Skip to content

Support headers override in Request.fetch() to enable Date header–based signature auth with proxy #5737

@rapsealk

Description

@rapsealk

Motivation

http://Backend.AI ’s authentication signature depends on the Date HTTP header:

However, when using Webserver as a proxy, it is currently impossible to forward the client’s original Date header to the upstream server, because the Request.fetch() method always refreshes and overrides the Date header as part of its internal behavior:

This prevents implementations that rely on Date-header–based signature authentication from functioning correctly behind a proxy.

Required Features

Extend Request.fetch() to support explicit header overrides, so that the caller can force specific values (e.g., Date) to be used instead of the internally refreshed ones.

Example usage:

request.fetch(
    headers={
        "Date": "Tue, 02 Sep 2025 08:00:00 GMT",
    }
)

Impact

This would ensure that the provided Date header is preserved and passed through, enabling signature-based authentication behind proxies.

Testing Scenarios

JIRA Issue: BA-2257

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Story.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions