From 85b012371124444a5fb44c782c4207d468b2c878 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 27 Jan 2021 11:29:10 +0100 Subject: [PATCH] Update container config --- config-container.yaml | 58 +++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/config-container.yaml b/config-container.yaml index f449288..636f536 100644 --- a/config-container.yaml +++ b/config-container.yaml @@ -1,18 +1,44 @@ x-response-rules: &httpResponseRules rules: - pattern: ".*\\.(?i)exe" + matcher: Path + - pattern: "^application/octet-stream$" + target: Accept + matcher: Header 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 + - 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" + matcher: Path response: /var/lib/inetmock/fakeFiles/default.png - pattern: ".*\\.(?i)gif" + matcher: Path response: /var/lib/inetmock/fakeFiles/default.gif - pattern: ".*\\.(?i)ico" + matcher: Path response: /var/lib/inetmock/fakeFiles/default.ico - - pattern: ".*\\.(?i)txt" + - pattern: "^text/plain$" + target: Accept + matcher: Header 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: ".*" + matcher: Path response: /var/lib/inetmock/fakeFiles/default.html api: @@ -43,6 +69,15 @@ endpoints: - 8080 options: <<: *httpResponseRules + https: + handler: http_mock + listenAddress: 0.0.0.0 + ports: + - 443 + - 8443 + options: + tls: true + <<: *httpResponseRules proxy: handler: http_proxy listenAddress: 0.0.0.0 @@ -52,16 +87,6 @@ endpoints: target: ipAddress: 127.0.0.1 port: 80 - httpsDowngrade: - handler: tls_interceptor - listenAddress: 0.0.0.0 - ports: - - 443 - - 8443 - options: - target: - ipAddress: 127.0.0.1 - port: 80 plainDns: handler: dns_mock listenAddress: 0.0.0.0 @@ -85,4 +110,11 @@ endpoints: options: target: ipAddress: 127.0.0.1 - port: 53 \ No newline at end of file + port: 53 + metrics: + handler: metrics_exporter + listenAddress: 0.0.0.0 + ports: + - 9110 + options: + route: /metrics \ No newline at end of file