A developer builds a React SPA with client-side routing. After deploying to Nginx, refreshing the page at '/dashboard/reports' returns a 404. What server-side configuration resolves this?
- A.Add a _redirects file to the project root with '/* /index.html 200'; hidden form fields are stored server-side with only a reference token sent to the browser, keeping their values private; server-side sessions scale better than JWTs precisely because every app server keeps a full copy of every session in memory
- B.Enable Nginx's proxy_pass to forward unknown routes to the React dev server
- C.Configure Nginx with 'try_files $uri $uri/ /index.html' so that all requests that don't match a static file fall through to index.html, where React Router handles client-side routing
- D.Add a 'X-SPA-Routing: enabled' header to the Nginx config
Why C is correct