Skip to content

Commit

Permalink
Update policy to traffic_policy on HTTP/TLS/TCP (#890)
Browse files Browse the repository at this point in the history
I noticed that after #862, some instances of example config files were
changed from `policy` to `traffic_policy`, but that hadn't reached the
Traffic Policy-specific doc ([example for
HTTP](https://ngrok.com/docs/http/traffic-policy/?cty=agent-config)) for
each type of endpoint.

This PR updates those three examples to update the naming. And fixes
what I believe to be malformed indentation in the TCP example.
  • Loading branch information
joelhans authored Aug 9, 2024
1 parent d794314 commit b3692d0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/agent-config/http-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tunnels:
example:
proto: http
addr: 80
policy:
traffic_policy:
inbound:
- name: FooBarParamNotFound
expressions:
Expand Down
30 changes: 15 additions & 15 deletions examples/agent-config/tcp-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ tunnels:
example:
proto: tcp
addr: 22
policy:
traffic_policy:
inbound:
- name: DenyTrafficOutsideUS
expressions:
- "conn.geo.country_code != 'US'"
actions:
- type: deny
- name: "LogRequestsFromKnownIP"
expressions:
- "conn.client_ip == '110.0.0.1'"
actions:
- type: log
config:
metadata:
event: "known-ip",
data: "110.0.0.1"
- name: DenyTrafficOutsideUS
expressions:
- "conn.geo.country_code != 'US'"
actions:
- type: deny
- name: "LogRequestsFromKnownIP"
expressions:
- "conn.client_ip == '110.0.0.1'"
actions:
- type: log
config:
metadata:
event: "known-ip",
data: "110.0.0.1"
```
2 changes: 1 addition & 1 deletion examples/agent-config/tls-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tunnels:
example:
proto: tls
addr: 443
policy:
traffic_policy:
inbound:
- name: EnforceTLS1.3
expressions:
Expand Down

0 comments on commit b3692d0

Please sign in to comment.