-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reject requests using the CONNECT method ( Fixes #312) #327
Conversation
builder.add(new ViaHeaderAppendingInterceptor()); | ||
builder.add(new HopByHopHeadersRemovingInterceptor()); | ||
builder.add(new RequestEnrichingInterceptor(config.styxHeaderConfig())); | ||
builder.add(new TcpTunnelRequestRejector()). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems that you use different convention with the dot at the end instead of at the front
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting stylistic changes only. To keep styx codebase consistent. Otherwise all good.
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is what needs to be done. However please follow styx coding standards, specifically use static imports with METHOD_NOT_ALLOWED, and CONNECT. Also I would remove the extra empty lines.
it("Should reject CONNECT requests") { | ||
val request = get("/connectTest") | ||
.addHeader(HOST, styxServer.proxyHost) | ||
.method(HttpMethod.CONNECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static import if possible.
No description provided.