© Anton Dolganin 2025
Need to return a test JSON, mock response, or block an annoying callback — but don't want to touch the backend?
location = /fake-api {
default_type application/json;
return 200 '{"status":"ok","debug":true}';
}
No proxying, no controller, no mock server. Just Nginx. I use this for local testing, quick stubs, or when frontend’s ready and backend’s not.
© Anton Dolganin 2025