Closed SidneyLann closed 5 years ago
A single sentence about a feature in some other server I don't know about isn't helpful. Please describe in detail the feature you're twisting l requesting.
in react, access index page, like http://localhost/index.html, when click the menu and rout to another page like /mgt/supplierList, if I click the fresh button of the browser, 404 exists because the server side has no /mgt/supplierList, however, nginx has the try_files directive to solve this problem like below: location / { root /home/sidney/html; index index.html; try_files $uri /index.html; }
if the uri not exists in server side, so redirect to /index.html
spring.cloud.gateway.routes[13].id=index2 spring.cloud.gateway.routes[13].uri=forward:///mgt/index.html spring.cloud.gateway.routes[13].predicates[0]=Path=/mgt
these lines do the thing for try_files, no need to implement now, thanks.
try_files functionality like it in nginx to support react