# Internal bridge from the 110 Prometheus network to the 188 EwoooC ingress.
server {
    listen 172.20.0.1:19191;
    server_name ewooooc-metrics.internal;
    access_log off;

    location = /metrics {
        allow 127.0.0.1;
        allow 172.16.0.0/12;
        allow 192.168.0.110/32;
        deny all;

        proxy_pass https://192.168.0.188/metrics;
        proxy_http_version 1.1;
        proxy_ssl_server_name on;
        proxy_ssl_name mo.wooo.work;
        proxy_ssl_verify on;
        proxy_ssl_verify_depth 3;
        proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
        proxy_set_header Host mo.wooo.work;
    }

    location / {
        return 404;
    }
}
