Slide 14
Slide 14 text
14
Kong Proprietary and Confidential
THE CLOUD CONNECTIVITY COMPANY
A DSL-based approach
"protocols": ["http", "https"],
"methods": ["GET", "POST"],
"hosts": ["example.com" ,
"foo.test"],
"paths": ["/foo", "/bar"],
"headers":
{"x-another-header":["bla"],
"x-my-header":["foo", "bar"]},
2.x 3.x
(net.protocol == "http" || net.protocol ==
"https") &&
(http.method == "GET" || http.method == "POST") &&
(http.host == "example.com" || http.host ==
"foo.test") &&
(http.path ^= "/foo" || http.path ^= "/bar") &&
http.headers.x_another_header == "bla" &&
(http.headers.x_my_header == "foo" ||
http.headers.x_my_header == "bar")
14