Skip to content

Commit

Permalink
[MISC] Allow HEAD method on /api/verify (#850)
Browse files Browse the repository at this point in the history
This is to natively support the upstream HAProxy module haproxy-auth-request without patching.
  • Loading branch information
nightah committed Apr 11, 2020
1 parent 76e8142 commit 0189688
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions internal/server/server.go
Expand Up @@ -38,6 +38,7 @@ func StartServer(configuration schema.Configuration, providers middlewares.Provi
middlewares.RequireFirstFactor(handlers.ExtendedConfigurationGet)))

router.GET("/api/verify", autheliaMiddleware(handlers.VerifyGet))
router.HEAD("/api/verify", autheliaMiddleware(handlers.VerifyGet))

router.POST("/api/firstfactor", autheliaMiddleware(handlers.FirstFactorPost))
router.POST("/api/logout", autheliaMiddleware(handlers.LogoutPost))
Expand Down
1 change: 0 additions & 1 deletion internal/suites/example/compose/haproxy/Dockerfile
Expand Up @@ -6,6 +6,5 @@ apk add --no-cache \
lua5.3-socket \
openssl && \
curl -Lfs -o /usr/local/etc/haproxy/auth-request.lua "https://raw.githubusercontent.com/TimWolla/haproxy-auth-request/master/auth-request.lua" && \
sed -i 's/HEAD/GET/g' /usr/local/etc/haproxy/auth-request.lua && \
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=AU/ST=Victoria/L=Melbourne/O=Authelia/CN=*.example.com" -keyout haproxy.key -out haproxy.crt && \
cat haproxy.key haproxy.crt > /usr/local/etc/haproxy/haproxy.pem

0 comments on commit 0189688

Please sign in to comment.