A preview service retrieves a URL on behalf of a visitor. That gives the visitor a route through the server's network permissions. If the service accepts any address, a public form can become a reader for internal services. OWASP groups server-side request forgery under A01:2025.
Start with a narrow requirement: the client needs two published resources. Compare the parsed origin exactly, then allow only the intended paths. Hostname prefixes and broad path access are common mistakes. The fictional network here makes those mistakes visible without contacting a server. Real clients also need an egress policy, DNS and address checks, and a decision about redirects.
Read the fixed handler, then apply the same idea to each exercise.