I neglected to include the logs produced by this example. Here they are:
*30 [lua] rewrite_by_lua(main.conf:50):2: --- _verify Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] content_by_lua(main.conf:47):2: --- _verify Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] rewrite_by_lua(main.conf:31):2: --- auth_redirect Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] content_by_lua(main.conf:27):2: --- auth_redirect Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] rewrite_by_lua(main.conf:31):2: --- auth_redirect Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
*30 [lua] access_by_lua(main.conf:35):2: --- auth_redirect Access phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
*30 [lua] content_by_lua(main.conf:27):2: --- auth_redirect Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
*30 [lua] rewrite_by_lua(main.conf:50):2: --- _verify Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] content_by_lua(main.conf:47):2: --- _verify Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] rewrite_by_lua(main.conf:31):2: --- auth_redirect Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] content_by_lua(main.conf:27):2: --- auth_redirect Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", subrequest: "/_verify", host: "localhost"
*30 [lua] rewrite_by_lua(main.conf:31):2: --- auth_redirect Rewrite phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
*30 [lua] access_by_lua(main.conf:35):2: --- auth_redirect Access phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
*30 [lua] content_by_lua(main.conf:27):2: --- auth_redirect Content phase ---, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost"
I am, in particular, puzzled by auth_redirect
being called first as part of the /_verify
subrequest.