Skip to content

Commit 7f6dc1f

Browse files
committed
Fix docs.
1 parent 55ca94b commit 7f6dc1f

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,61 +11,61 @@ It has the following features:
1111
If the upstream HTTP server listens on `127.0.0.1:3000` and you want to get your browser to access to it by a request to `http://example.com`, the configuration should look as follows:
1212

1313
```
14-
hosts:
14+
hosts:
1515
http://example.com:
16-
- ^(/*)$: http://127.0.0.1:3000$1
16+
- ^(/*)$: http://127.0.0.1:3000$1
1717
```
1818

1919
* Transparent TLS wrapping (simulation of an SSL/TLS-enabled environment)
2020

21-
You can also make it possible to access to the upstream by hitting `https://example.com/` by adding the configuration like the following:
21+
You can also make it possible to direct the request to `https://example.com/` to the upstream by adding the configuration like the following:
2222

2323
```
24-
hosts:
24+
hosts:
2525
http://example.com:
26-
- ^(/*)$: http://127.0.0.1:3000$1
26+
- ^(/*)$: http://127.0.0.1:3000$1
2727
https://example.com:
28-
- ^(/*)$: http://127.0.0.1:3000$1
28+
- ^(/*)$: http://127.0.0.1:3000$1
2929
```
3030

3131
It is however necessary to set up the private PKI for issuing bogus server certificates and let your browser trust the PKI's root CA certificate. **DO IT YOUR OWN RISK.**
3232

3333
The CA for issuing bogus server certificates is configured as follows:
3434

3535
```
36-
tls:
36+
tls:
3737
ca:
38-
cert: testca.rsa.crt.pem
39-
key: testca.rsa.key.pem
40-
hosts:
41-
...
38+
cert: testca.rsa.crt.pem
39+
key: testca.rsa.key.pem
40+
hosts:
41+
...
4242
```
4343

4444
* Request header modification
4545

4646
You can add / remove arbitrary request HTTP headers for the request being rewritten:
4747

4848
```
49-
hosts:
49+
hosts:
5050
http://example.com:
51-
- ^(/*)$: http://127.0.0.1:3000$1
52-
headers:
53-
X-Forwarded-Proto: https
54-
Removed-Header: null
51+
- ^(/*)$: http://127.0.0.1:3000$1
52+
headers:
53+
X-Forwarded-Proto: https
54+
Removed-Header: null
5555
```
5656

5757
* Testing FastCGI-enabled upstream
5858

5959
You can forward the request to a FastCGI-enabled upstream:
6060

6161
```
62-
hosts:
62+
hosts:
6363
http://example.com:
64-
- ^(((?:/.*)*/[^/]+\.php)(/.*|$)): fastcgi://localhost$1
65-
headers:
66-
X-Cgi-Script-Filename: /var/www/document/root$2
67-
X-Cgi-Script-Name: $2
68-
X-Cgi-Path-Info: $3
64+
- ^(((?:/.*)*/[^/]+\.php)(/.*|$)): fastcgi://localhost$1
65+
headers:
66+
X-Cgi-Script-Filename: /var/www/document/root$2
67+
X-Cgi-Script-Name: $2
68+
X-Cgi-Path-Info: $3
6969
```
7070

7171

0 commit comments

Comments
 (0)