Added support to specify Custom Hop-By-Hop Headers#140
Open
Yash-294 wants to merge 2 commits intoeclipse-vertx:mainfrom
Open
Added support to specify Custom Hop-By-Hop Headers#140Yash-294 wants to merge 2 commits intoeclipse-vertx:mainfrom
Yash-294 wants to merge 2 commits intoeclipse-vertx:mainfrom
Conversation
vietj
reviewed
Oct 11, 2025
| */ | ||
| public static final boolean DEFAULT_SUPPORT_WEBSOCKET = true; | ||
|
|
||
| public static final List<String> DEFAULT_HOP_BY_HOP_HEADERS = new ArrayList<>(Arrays.asList( |
Member
There was a problem hiding this comment.
I think a Set would be better here
Author
There was a problem hiding this comment.
Yes, updated this. Used Set instead of List
vietj
reviewed
Oct 11, 2025
| * | ||
| * @param customHopHeaders the list of hop-by-hop headers to set | ||
| */ | ||
| public ProxyOptions setCustomHopHeaders(List<String> customHopHeaders){ |
Member
There was a problem hiding this comment.
can you add an "adder" method : addCustomHopHeader
Author
There was a problem hiding this comment.
Yes, added a new function addCustomHopHeader to allow adding hop header to existing set
vietj
reviewed
Oct 11, 2025
| * @return a reference to this, so the API can be used fluently | ||
| */ | ||
| static ProxyRequest reverseProxy(HttpServerRequest proxiedRequest, List<String> customHopHeaders) { | ||
| proxiedRequest.pause(); |
Member
There was a problem hiding this comment.
I would rather not add a new constructor and instead use a modifier on the request
Author
There was a problem hiding this comment.
Noted & made the changes for the same.
…stomHopHeader to allow adding headers to current hop headers set
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.
Motivation:
To allow users to specify custom hop-by-hop headers.