Skip to content

Commit c43727b

Browse files
zucchinidevgeofffranks
authored andcommitted
docs: optional parameter protocol in proxy endpoint
Add documentation for the `protocol` query parameter in the `/proxy/${destination}` endpoint. When set to `https`, the request to the destination will use HTTPS. If not set, HTTP is used by default. Fix some curl examples to use the correct URL.
1 parent 54e47d6 commit c43727b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/example-apps/proxy/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $ curl https://proxy.mydomain.com/dig/example.com
6666
to the endpoint using UDP.
6767

6868
```bash
69-
$ curl https://proxy.mydomain.com/dig/example.com
69+
$ curl https://proxy.mydomain.com/digudp/example.com
7070
["93.184.216.34"]
7171
```
7272

@@ -238,6 +238,14 @@ $ curl https://appa.mydomain.com/proxy/appB.apps.internal:8080
238238
{"ListenAddresses":["127.0.0.1","10.255.208.82"],"Port":8080}
239239
```
240240

241+
#### Optional parameter `protocol`
242+
The Proxy handler also accepts an optional string query parameter
243+
`protocol`.
244+
When set to `https`, it will:
245+
- Make the request to the destination using HTTPS.
246+
When not set:
247+
- HTTP is used by default.
248+
241249
## `/stats`
242250

243251
[Stats handler](./handlers/stats_handler.go) returns latency data for prior
@@ -266,7 +274,7 @@ $ curl https://appa.mydomain.com/stats
266274
timing information in the response.
267275

268276
```bash
269-
$ curl https://proxy.mydomain.com/dig/example.com
277+
$ curl https://proxy.mydomain.com/timed_dig/example.com
270278
{"lookup_time_ms":2,"ips":["93.184.216.34","\u003cnil\u003e"]}
271279
```
272280

0 commit comments

Comments
 (0)