Open theolampert opened 3 years ago
Isn't this a question about routing in the frontend app and not on the frontend server? I mean we can solve this within the frontend project, right?
Routing in the frontend is already there, but routing on the frontend will only handle pushState
routing in the browser, you would need to adjust something in the configuration of the frontend's server e.g /* -> index.html
for the server to know what to do with a URL if you come to that URL directly.
https://create-react-app.dev/docs/deployment I think there is something here specific for apache
for example, routing to https://pt.moewencloud.de/welcome does not resolve.
Links opened from email directing a user to verify an auth token will 404 as the frontend's server does not recognize the
/verify-token
endpoint. Two options:Configure the frontend's server to redirect this request to the react app e.g. to the build
index.html
Put both apps under one domain with separate subdomains and handle this verification link from the server, setting a http-only cookie from the server and redirecting to the frontend. This has the advantage of using the more secure http-only cookie but requires some setup.