This repository contains a small express and nginx setup to test the http_auth_request_module. Basically the nginx is sending a subrequest for the location "/private/". If the subrequest is not responding with a 200 statuscode, the request is not authenticated and results in a 401 Unauthorized response. NGINX is returning the statuscode auf the subrequest. Currently the express application returns a 401 statuscode.
Documentation: Authentication Based on Subrequest Result
- docker
- docker-compose
- Add new hosts entry
echo "127.0.0.1 auth-poc.local" | sudo tee -a /etc/hosts
- Run following command in project root
$ docker-compose up
- Open http://auth-poc.local/public/ in your browser