Step 1: Copy and paste the following commands to start your NGINX container with this lab’s files: Notice the SECRET_KEY environment variable
This configuration rejects the first attempt to access the /secure/ location by responding with a 302 redirect back to itself. Notice that along with the redirect a cookie is also set in the user’s web client. The cookie contains an MD5 hash that is generated by our njs code. When the web client tries the request again, the cookie gets passed back to the server which NGINX then verifies to allow access.