dearborn-coding-club / website-base-frontend

https://dearborncodingclub.com
1 stars 1 forks source link

404 Not found in notes page #54

Open alvi1316 opened 1 month ago

alvi1316 commented 1 month ago

Description

alvi1316 commented 1 month ago

This page might have some information about how to fix the issue https://community.fly.io/t/how-to-fix-404-error-when-accessing-a-specific-url-for-create-react-apps-client-side-routing/7229

MgenGlder commented 1 month ago

This page might have some information about how to fix the issue https://community.fly.io/t/how-to-fix-404-error-when-accessing-a-specific-url-for-create-react-apps-client-side-routing/7229

That's interesting, yeah we could probably set Django configuration to send all unknown requests to the base route- I think that would fix the 404s. In the future we could have it so that the unknown routes still respect the react router as well.

MgenGlder commented 1 month ago

I took a brief look at this and I think it can be resolved by modifying our usage of the goStatic container. We can provide it a parameter that will allow the server to default to returning the index.html file when it encounters an unknown route.