Skip to content
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

fix: wildcard example #925

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/http/basic-auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,22 @@ Without any credentials:

```bash
curl https://your-domain.ngrok.app/status/200

401 Unauthorized
```

`401 Unauthorized`

With incorrect credentials:

```bash
curl https://your-domain.ngrok.app/status/200 --user "foo:bar"

401 Unauthorized
```

`401 Unauthorized`

And finally with valid credentials:

```bash
curl https://your-domain.ngrok.app/status/200 --user "falken:joshuahunter2" -I

HTTP/2 200
```

`HTTP/2 200`
2 changes: 1 addition & 1 deletion docs/http/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ ngrok http foo.local:80 --host-header=rewrite
It is equivalent to:

```
ngrok http foo.local:80 --request-header-add='foo.local'
ngrok http foo.local:80 --request-header-add='host:foo.local'
```

#### File Serving
Expand Down
6 changes: 3 additions & 3 deletions docs/http/ip-restrictions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ngrok supports IPv6 addresses for all IP rules. You may use standard abbreviated
notations.

```
ngrok http 80 --allow-cidr "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
ngrok http 80 --cidr-allow "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
```

Don't forget to create IPv6 rules. It's easy to test only with IPv4 and then
Expand Down Expand Up @@ -155,8 +155,8 @@ Then run ngrok with IP Restrictions with the IPv4 and IPv6 addresses you got in
```bash
ngrok http 80 \
--url your-domain.ngrok.app \
--allow-cidr 2600:8c00::a03c:91ee:fe69:9695/32 \
--allow-cidr 78.227.75.230/32
--cidr-allow 2600:8c00::a03c:91ee:fe69:9695/32 \
--cidr-allow 78.227.75.230/32
```

Then make requests to your ngrok domain using the `-4` and `-6` flags to test both IPv4 and IPv6:
Expand Down
2 changes: 1 addition & 1 deletion docs/http/mutual-tls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Mutual TLS module.
Run `curl` with the following command:

```bash
curl --client client-cert.pem --key client-key.pem https://yourapp.ngrok.app
curl --cert client-cert.pem --key client-key.pem https://yourapp.ngrok.app
```

`curl` has a shortcut to pass a single file if the private key and certificate
Expand Down
2 changes: 1 addition & 1 deletion docs/network-edge/domains-and-tcp-addresses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ For example:
###### Listen for all subdomains of `example.com`

```bash
ngrok http 80 --url *.example.com
ngrok http 80 --url "*.example.com"
```

The following rules define the behavior of endpoints on wildcard domains. To
Expand Down
6 changes: 3 additions & 3 deletions docs/tcp/ip-restrictions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ngrok supports IPv6 addresses for all IP rules. You may use standard abbreviated
notations.

```
ngrok tcp 22 --allow-cidr "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
ngrok tcp 22 --cidr-allow "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
```

Don't forget to create IPv6 rules. It's easy to test only with IPv4 and then
Expand Down Expand Up @@ -138,8 +138,8 @@ Then run ngrok with IP Restrictions with the IPv4 and IPv6 addresses you got in
```bash
ngrok tcp 80 \
--remote-addr 1.tcp.ngrok.io:12345 \
--allow-cidr 2600:8c00::a03c:91ee:fe69:9695/32 \
--allow-cidr 78.227.75.230/32
--cidr-allow 2600:8c00::a03c:91ee:fe69:9695/32 \
--cidr-allow 78.227.75.230/32
```

Then make requests to your ngrok domain using the `-4` and `-6` flags to test both IPv4 and IPv6:
Expand Down
6 changes: 3 additions & 3 deletions docs/tls/ip-restrictions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ngrok supports IPv6 addresses for all IP rules. You may use standard abbreviated
notations.

```
ngrok tls 443 --allow-cidr "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
ngrok tls 443 --cidr-allow "::/0" --deny-cidr "2600:1f16:d83:1202::6e:2/128"
```

Don't forget to create IPv6 rules. It's easy to test only with IPv4 and then
Expand Down Expand Up @@ -138,8 +138,8 @@ Then run ngrok with IP Restrictions with the IPv4 and IPv6 addresses you got in
```bash
ngrok tls 443 \
--url your-domain.ngrok.app \
--allow-cidr 2600:8c00::a03c:91ee:fe69:9695/32 \
--allow-cidr 78.227.75.230/32
--cidr-allow 2600:8c00::a03c:91ee:fe69:9695/32 \
--cidr-allow 78.227.75.230/32
```

Then make requests to your ngrok domain using the `-4` and `-6` flags to test both IPv4 and IPv6:
Expand Down
2 changes: 1 addition & 1 deletion docs/tls/mutual-tls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Mutual TLS module.
Run `curl` with the following command:

```bash
curl --client client-cert.pem --key client-key.pem https://yourapp.ngrok.app
curl --cert client-cert.pem --key client-key.pem https://yourapp.ngrok.app
```

`curl` has a shortcut to pass a single file if the private key and certificate
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-cli/http-fileserver-abs-path.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```bash
ngrok http file://`pwd`
ngrok http "file:///var/log"
```
2 changes: 1 addition & 1 deletion examples/agent-cli/http-fileserver-working-dir.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```bash
ngrok http "file:///var/log"
ngrok http file://`pwd`
```
2 changes: 1 addition & 1 deletion examples/agent-cli/http-wildcard-domain.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```bash
ngrok http 80 --url *.example.com
ngrok http 80 --url "*.example.com"
```