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

Edho Arief me at
Mon Aug 8 17:02:39 UTC 2016


On Tue, Aug 9, 2016, at 01:59, msonntag wrote:
> 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
> >page.
> 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
> whatsoever.

Well, the backend can for example download and cache frontend's index

More information about the nginx mailing list