Open Crissium opened 1 month ago
Maybe consider switch to createHashRouter?
Maybe consider switch to createHashRouter?
Thanks for your advice but I was talking about the following problem: if you manually enter the address http://127.0.0.1:2628/library/dictionaries, Flask would return 404 because there isn't a corresponding route registered. At this point it should return index.html instead. That is, I am trying to achieve the equivalent to this nginx config: try_files $uri $uri/ /index.html;
with Flask.
Well I should have been clearer when I create an issue, even if it's in my own repo...
I hope I haven't misunderstood you. In this case, you could either switch to HashRouter so that the path would be http://127.0.0.1:2628/#/library/dictionaries
and flask won't complain anythng, or you could configure a fallback catch-all router for flask and route everything it doesn't know to react and let it handle, or like you said, use nginx to redirect the paths.
Sorry I misunderstood your comment at first because I'm not familiar with the term hash router and read it as something wildly different 😅. Indeed it should be a very good solution to try out
Tried a wildcard path and it didn't work.