Skip to content

Commit

Permalink
chore: disable auth for debug issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Jun 18, 2024
1 parent ba037b4 commit a968d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -e

# raise error if AUTH_TOKEN is not set
if [ -z "$AUTH_TOKEN" ]; then
echo "ERROR: AUTH_TOKEN is not set"
exit 1
fi
# if [ -z "$AUTH_TOKEN" ]; then
# echo "ERROR: AUTH_TOKEN is not set"
# exit 1
# fi

# replace ${AUTH_TOKEN} with the value of AUTH_TOKEN
sed "s/\${AUTH_TOKEN}/$AUTH_TOKEN/g" /usr/local/etc/haproxy/haproxy.cfg.template > /usr/local/etc/haproxy/haproxy.cfg
Expand Down
4 changes: 2 additions & 2 deletions haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ defaults
frontend docker_frontend
bind :2375

http-request deny if !{ path_beg -i /${AUTH_TOKEN} }
http-request set-uri %[url,regsub(^/${AUTH_TOKEN},,)]
# http-request deny if !{ path_beg -i /${AUTH_TOKEN} }
# http-request set-uri %[url,regsub(^/${AUTH_TOKEN},,)]

http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping } METH_GET { env(PING_READ) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping } METH_HEAD { env(PING_READ) -m bool }
Expand Down

0 comments on commit a968d85

Please sign in to comment.