-
Notifications
You must be signed in to change notification settings - Fork 170
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
Policy: Camel proxy #1193
Policy: Camel proxy #1193
Conversation
t/apicast-policy-camel.t
Outdated
|
||
__DATA__ | ||
|
||
=== TEST 1: API backend connection uses proxy |
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.
Should this say "http proxy" to differentiate it from the other 2 tests?
@@ -0,0 +1,77 @@ | |||
# Camel proxy policy |
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.
Not sure if this is the best name for the policy. There's nothing camel-specific, it's valid for any proxy, right?
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.
The TLS is only for camel (With termination) and the policy name is suggested to be like that:
https://issues.redhat.com/browse/THREESCALE-4867
t/apicast-policy-camel.t
Outdated
|
||
require("http_proxy.pl"); | ||
|
||
repeat_each(3); |
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.
Why 3 times?
|
||
function _M:export() | ||
return { | ||
get_http_proxy = function(uri) |
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.
I think it'd be good to document here who expects this function to be in the context.
7968e53
to
fc39751
Compare
Camel netty proxy was used via http-proxy policy, but on TLS connections, the CONNECT method[0] is not allowed, so the request needs to be terminated by camel-proxy and send to the upstream API. With this change, we duplicate the http-proxy and we set the proxy to terminate the connection so that will work correctly on camel TLS connections. [0] https://www.ietf.org/rfc/rfc2817.txt Fix THREESCALE-4867 Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
fc39751
to
675e329
Compare
Camel netty proxy was used via http-proxy policy, but on TLS
connections, the CONNECT method[0] is not allowed, so the request needs
to be terminated by camel-proxy and send to the upstream API.
With this change, we duplicate the http-proxy and we set the proxy to
terminate the connection so that will work correctly on camel TLS
connections.
[0] https://www.ietf.org/rfc/rfc2817.txt
Fix THREESCALE-4867
Signed-off-by: Eloy Coto eloy.coto@acalustra.com