feat: add support for custom headers in trustless gateway#732
Closed
feat: add support for custom headers in trustless gateway#732
Conversation
Added an optional `headers` property to the `TrustlessGatewayBlockBroker` and `TrustlessGatewaySession` options, allowing users to specify custom headers for HTTP requests. Changes include: * Added `headers` property to `TrustlessGatewayBlockBroker` and `TrustlessGatewaySession` options * Updated `findHttpGatewayProviders` function to accept an optional `headers` object * Passed `headers` object to `TrustlessGateway` constructor * Updated `TrustlessGateway` constructor to accept an optional `headers` object * Added `headers` to HTTP request options in `TrustlessGateway`
SgtPooki
reviewed
Feb 27, 2025
Member
SgtPooki
left a comment
There was a problem hiding this comment.
@pcfreak30 Thanks again for throwing this together.
I talked with @achingbrain about this. We will probably alter this to accept a function where users can alter the RequestInit object we pass to the fetch call on line 108 of packages/block-brokers/src/trustless-gateway/trustless-gateway.ts
This will allow users to modify headers or anything else they need to so we don't have to foresee the various changes users might need to make, nor keep modifying or maintaining those changes as needed for their special use-cases.
This will keep things flexible for various new use-cases while keeping the maintenance burden low
3 tasks
Member
|
closing this in favor of #751. Thanks for the headstart @pcfreak30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.