no 404 on refresh

This commit is contained in:
Will Freeman
2024-10-03 19:22:17 -05:00
parent 7424cb83bb
commit e32edaf439
21 changed files with 223 additions and 62 deletions
@@ -70,9 +70,12 @@ object ShotgunServer {
)
}
val spaRoutes = pathSingleSlash {
val spaRoutes = pathEndOrSingleSlash {
getFromFile("../webapp/dist/index.html")
} ~ getFromDirectory("../webapp/dist")
} ~ getFromDirectory("../webapp/dist") ~
path(Remaining) { _ =>
getFromFile("../webapp/dist/index.html")
}
val routes = handleRejections(rejectionHandler) {
cors(corsSettings) {