Skip to content

Commit

Permalink
fix expression examples in traffic policy modules (ngrok#823)
Browse files Browse the repository at this point in the history
ip addresses need to be quoted
  • Loading branch information
rkolavo authored Jul 3, 2024
1 parent 7b6d0db commit 9bfbea1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/agent-cli/tcp-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ngrok tcp 22 --policy-file /path/to/policy.yml
inbound:
- name: "LimitToKnownIPs"
expressions:
- "conn.client_ip != 8.8.8.8"
- "conn.client_ip != 9.9.9.9"
- "conn.client_ip != '8.8.8.8'"
- "conn.client_ip != '9.9.9.9'"
actions:
- type: deny
```
4 changes: 2 additions & 2 deletions examples/agent-cli/tls-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ngrok tls 80 --policy-file /path/to/policy.yml
inbound:
- name: "LimitToKnownIPs"
expressions:
- "conn.client_ip != 8.8.8.8"
- "conn.client_ip != 9.9.9.9"
- "conn.client_ip != '8.8.8.8'"
- "conn.client_ip != '9.9.9.9'"
actions:
- type: deny
```
4 changes: 2 additions & 2 deletions examples/go-sdk/tcp-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func ngrokListener(ctx context.Context) (net.Listener, error) {
{
Name: "LimitToKnownIPs",
Expressions: []string{
"conn.client_ip != 8.8.8.8",
"conn.client_ip != 9.9.9.9",
"conn.client_ip != '8.8.8.8'",
"conn.client_ip != '9.9.9.9'",
},
Actions: []policy.Action{
{
Expand Down
4 changes: 2 additions & 2 deletions examples/go-sdk/tls-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func ngrokListener(ctx context.Context) (net.Listener, error) {
{
Name: "LimitToKnownIPs",
Expressions: []string{
"conn.ClientIP != 8.8.8.8",
"conn.ClientIP != 9.9.9.9",
"conn.ClientIP != '8.8.8.8'",
"conn.ClientIP != '9.9.9.9'",
},
Actions: []policy.Action{
{
Expand Down
4 changes: 2 additions & 2 deletions examples/k8s/tcp-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
inbound:
- name: "LimitToKnownIPs"
expressions:
- "conn.client_ip != 8.8.8.8"
- "conn.client_ip != 9.9.9.9"
- "conn.client_ip != '8.8.8.8'"
- "conn.client_ip != '9.9.9.9'"
actions:
- type: deny

Expand Down
4 changes: 2 additions & 2 deletions examples/k8s/tls-traffic-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ spec:
inbound:
- name: "LimitToKnownIPs"
expressions:
- "conn.ClientIP != 8.8.8.8"
- "conn.ClientIP != 9.9.9.9"
- "conn.ClientIP != '8.8.8.8'"
- "conn.ClientIP != '9.9.9.9'"
actions:
- type: deny

Expand Down

0 comments on commit 9bfbea1

Please sign in to comment.