paleobot / pbot-dev

Codebase and initial design documents for pbot client
MIT License
2 stars 2 forks source link

Can't have routes with same name in client and server when using reverse proxy for server #247

Closed NoisyFlowers closed 9 months ago

NoisyFlowers commented 9 months ago

The api server and client both have routes /login and /register. This works in dev mode, when proxying to the api server happens locally. It does not work in production, when nginx is proxying to the api server.

In production, navigation within the client to /login works, since that is happening locally. But try reloading the /login page and you get an error. The reload requests the page from nginx, but nginx proxy's that path to the api server.

We need to change the name of those paths either in the client or the api.

NoisyFlowers commented 9 months ago

In the api, I change /login to /user/login and /register to /user/register.

This is in paleobot/pbot-api@7de1d914c3c13985f5e99c22ac349a1457c250a4 paleobot/pbot-client@f3e59cdce37ebfe78fd751ebea90675c6cfbddbd