You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,61 +11,61 @@ It has the following features:
11
11
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:
12
12
13
13
```
14
-
hosts:
14
+
hosts:
15
15
http://example.com:
16
-
- ^(/*)$: http://127.0.0.1:3000$1
16
+
- ^(/*)$: http://127.0.0.1:3000$1
17
17
```
18
18
19
19
* Transparent TLS wrapping (simulation of an SSL/TLS-enabled environment)
20
20
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:
22
22
23
23
```
24
-
hosts:
24
+
hosts:
25
25
http://example.com:
26
-
- ^(/*)$: http://127.0.0.1:3000$1
26
+
- ^(/*)$: http://127.0.0.1:3000$1
27
27
https://example.com:
28
-
- ^(/*)$: http://127.0.0.1:3000$1
28
+
- ^(/*)$: http://127.0.0.1:3000$1
29
29
```
30
30
31
31
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.**
32
32
33
33
The CA for issuing bogus server certificates is configured as follows:
34
34
35
35
```
36
-
tls:
36
+
tls:
37
37
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
+
...
42
42
```
43
43
44
44
* Request header modification
45
45
46
46
You can add / remove arbitrary request HTTP headers for the request being rewritten:
47
47
48
48
```
49
-
hosts:
49
+
hosts:
50
50
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
55
55
```
56
56
57
57
* Testing FastCGI-enabled upstream
58
58
59
59
You can forward the request to a FastCGI-enabled upstream:
0 commit comments