Skip to content

Commit

Permalink
Minor bug fix in Lua paths (#3)
Browse files Browse the repository at this point in the history
Remove experimental feature definitions from haproxy.cfg
  • Loading branch information
mclueppers authored Apr 13, 2023
1 parent 77c896e commit b53d9fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b53d9fe

Please sign in to comment.