template-fastapi-react icon indicating copy to clipboard operation
template-fastapi-react copied to clipboard

fix/404 on all react-router paths

Open soofstad opened this issue 1 year ago • 3 comments

Fixes a bug where routes defined only in the SPA (react-router etc.) returns 404.

nginx must return index.html for all files not found (assets, chunks, etc.)

soofstad avatar Sep 04 '24 13:09 soofstad

Does this also fix the frontend tests?

Which tests are failing?

soofstad avatar Sep 05 '24 05:09 soofstad

Does this also fix the frontend tests?

Which tests are failing?

image

mariuswinger avatar Sep 05 '24 10:09 mariuswinger

hmm, hard to make out the actual error. But I see a "ERR_NETWORK" in there, so probably not related. Also, this change only affect build static js serving from prod version of NGINX.

soofstad avatar Sep 05 '24 11:09 soofstad

@soofstad Is this ready to merge?

sebastianvitterso avatar Jan 14 '25 07:01 sebastianvitterso