A quick check at the door
After this film you canredirect signed-out visitors in proxy.ts (an optimistic check only).
Exercise
Download the exercise (a zip). Unzip it, read exercise.md, then in exercise/ run npm install and node check.mjs. The checker runs a real build and says PASS or FAIL for each criterion.
Recall
Answer each one out loud before you open it.
When does proxy.ts run?
Before the request reaches a route, so it can send someone elsewhere first.
Why does Carol's proxy need a matcher?
Without one it runs on every route, the login page too, and redirects there again and again, until the browser gives up.
Why does the save function still check, when Proxy guards the admin page?
Proxy is a quick check of a cookie, on the routes its matcher names; the save function can be POSTed to other routes, so the real check stays next to the data.