-
Notifications
You must be signed in to change notification settings - Fork 9
/
example.yml
53 lines (50 loc) · 1.6 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# proxy settings are optional
proxy:
http: http://127.0.0.1:9080/
https: http://127.0.0.1:9080/
excluded:
- localhost:8081
- localhost:8082
- www.google.com
- www.google.co.jp
# tls settings are optional if you don't want to use MITM
tls:
client:
verify: true
ca:
cert: testca.rsa.crt.pem
key: testca.rsa.key.pem
validity: 397
# MITM with prepared certificates
prepared:
- ^local\\.my-domain\\.example\\.com$:
cert: certs/my-domain-cert.pem
key: certs/my-domain-key.pem
- .*:
cert: real-certs/fallback-cert.pem
key: real-certs/fallback-key.pem
# response filters
response_filters:
- type: label
html: '<div style="position:fixed;left:0;top:0;width:100%;background-color:#ff0">DEVELOPMENT</div>'
insert_before: "</body>"
hosts:
http://example.com:
- ^(/static/.*)$: http://localhost:8081$1
- ^(/.*)$: http://localhost:8082$1
https://example.com:
- ^(/static/.*)$: http://localhost:8081$1
- ^(/.*)$: http://localhost:8082$1
# you can add arbitrary headers to every request that matches the pattern
headers:
X-Forwarded-Proto: https
http://fastcgi.example.com:
- ^(((?:/.*)*/[^/]+\.php)(/.*|$)): fastcgi://localhost$1
headers:
X-Cgi-Script-Filename: /document_root$2
X-Cgi-Script-Name: $2
X-Cgi-Path-Info: $3
http://redirect.example.com:
- ^/no-scheme$: x-http-redirect://example.com/?a=2%20#23424
- ^/with-scheme$: x-http-redirect:https://example.com/?a=2%20#23424
- ^/with-scheme-and-status-code$: x-http-redirect:302:https://example.com/?a=2%20#23424