Return proper status codes (404, 302) from client-side Single Page Application

msonntag nginx-forum at
Mon Aug 8 16:59:05 UTC 2016

Hi Edho,

> If going so far to hit api server anyway, why not proxy all requests 
> (except assets) and serve the index page if 200 and request type is
> html? nginx then can intercept errors and return correct html error

Yes, that would be possible. But – if I understand you correctly – my
backend would then need to serve the index page itself, and therefore be
highly coupled to the frontend.

Currently, my backend does not have any knowledge about the frontend

Thanks for your input.

Posted at Nginx Forum:,268827,268847#msg-268847

More information about the nginx mailing list