Skip to content
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

Merged
merged 3 commits into from
Oct 29, 2018

Conversation

dvlato
Copy link
Contributor

@dvlato dvlato commented Oct 25, 2018

No description provided.

builder.add(new ViaHeaderAppendingInterceptor());
builder.add(new HopByHopHeadersRemovingInterceptor());
builder.add(new RequestEnrichingInterceptor(config.styxHeaderConfig()));
builder.add(new TcpTunnelRequestRejector()).

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

Copy link
Contributor

@mikkokar mikkokar left a 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.

}
}


Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static import if possible.

@mikkokar mikkokar merged commit de00974 into ExpediaGroup:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants