Update container config

This commit is contained in:
Peter 2021-01-27 11:29:10 +01:00
parent 55dfcfabab
commit 85b0123711
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9

View file

@ -1,18 +1,44 @@
x-response-rules: &httpResponseRules x-response-rules: &httpResponseRules
rules: rules:
- pattern: ".*\\.(?i)exe" - pattern: ".*\\.(?i)exe"
matcher: Path
- pattern: "^application/octet-stream$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/sample.exe response: /var/lib/inetmock/fakeFiles/sample.exe
- pattern: ".*\\.(?i)(jpg|jpeg)" - pattern: "^image/jpeg$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.jpg response: /var/lib/inetmock/fakeFiles/default.jpg
- pattern: ".*\\.(?i)(jpg|jpeg)"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.jpg
- pattern: "^image/png$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.png
- pattern: ".*\\.(?i)png" - pattern: ".*\\.(?i)png"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.png response: /var/lib/inetmock/fakeFiles/default.png
- pattern: ".*\\.(?i)gif" - pattern: ".*\\.(?i)gif"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.gif response: /var/lib/inetmock/fakeFiles/default.gif
- pattern: ".*\\.(?i)ico" - pattern: ".*\\.(?i)ico"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.ico response: /var/lib/inetmock/fakeFiles/default.ico
- pattern: ".*\\.(?i)txt" - pattern: "^text/plain$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.txt response: /var/lib/inetmock/fakeFiles/default.txt
- pattern: ".*\\.(?i)txt"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.txt
- pattern: "^text/html$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.html
- pattern: ".*" - pattern: ".*"
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.html response: /var/lib/inetmock/fakeFiles/default.html
api: api:
@ -43,6 +69,15 @@ endpoints:
- 8080 - 8080
options: options:
<<: *httpResponseRules <<: *httpResponseRules
https:
handler: http_mock
listenAddress: 0.0.0.0
ports:
- 443
- 8443
options:
tls: true
<<: *httpResponseRules
proxy: proxy:
handler: http_proxy handler: http_proxy
listenAddress: 0.0.0.0 listenAddress: 0.0.0.0
@ -52,16 +87,6 @@ endpoints:
target: target:
ipAddress: 127.0.0.1 ipAddress: 127.0.0.1
port: 80 port: 80
httpsDowngrade:
handler: tls_interceptor
listenAddress: 0.0.0.0
ports:
- 443
- 8443
options:
target:
ipAddress: 127.0.0.1
port: 80
plainDns: plainDns:
handler: dns_mock handler: dns_mock
listenAddress: 0.0.0.0 listenAddress: 0.0.0.0
@ -85,4 +110,11 @@ endpoints:
options: options:
target: target:
ipAddress: 127.0.0.1 ipAddress: 127.0.0.1
port: 53 port: 53
metrics:
handler: metrics_exporter
listenAddress: 0.0.0.0
ports:
- 9110
options:
route: /metrics