diff --git a/Dockerfile b/Dockerfile index 3905bd1..0ff1310 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,13 +11,13 @@ RUN apk -U --no-cache add \ curl -L -o /tmp/haproxy-lua-dnsbl.tar.gz "https://github.com/dobrevit/haproxy-lua-dnsbl/archive/refs/tags/$DNSBL_VERSION.tar.gz" && \ tar -xzf /tmp/haproxy-lua-utils.tar.gz -C /tmp && \ tar -xzf /tmp/haproxy-lua-dnsbl.tar.gz -C /tmp && \ - mkdir -p /app/lib && \ - cp -r /tmp/haproxy-lua-utils-*/src/lib /app && \ - cp -r /tmp/haproxy-lua-dnsbl-*/src/* /app + mkdir -p /lua/lib && \ + cp -r /tmp/haproxy-lua-utils-*/src/lib /lua && \ + cp -r /tmp/haproxy-lua-dnsbl-*/src/* /lua FROM mclueppers/haproxy-lua-base:v0.1.1 RUN mkdir -p /etc/haproxy/lua/ -COPY --from=sources /app/* /etc/haproxy/lua +COPY --from=sources /lua /etc/haproxy/lua COPY haproxy.cfg /etc/haproxy/haproxy.cfg diff --git a/haproxy.cfg b/haproxy.cfg index 491c57a..0b5aadd 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -66,10 +66,6 @@ frontend http-in http-request sc-inc-gpc0(1) if is_banned_ip !is_banned_user http-request lua.dnsbl_block "st_user_ban" - - http-request use-service lua.sticktable_prometheus if is_permitted_ip { path_beg /tables-metrics } - http-request use-service lua.sticktable if is_permitted_ip { path_beg /tables } - acl client_ip_allowed var(txn.dnsbl_is_allowed) eq 1 http-request capture var(txn.dnsbl_is_allowed) len 5