teleclimber / Dropserver

An application platform for your personal web services. https://dropserver.org
Apache License 2.0
42 stars 1 forks source link

Appspace static serve route allow broad request to serve specific file #42

Closed teleclimber closed 2 years ago

teleclimber commented 2 years ago

Sometimes we need to do this:

r.add("get", {path:"/leftovers/", end:false}, authorizedOnly, r.staticFileHandler({path:'@app/frontend/index.html'}));

Meaning that any path that starts with /leftovers/ should serve index.html. We need this to serve frontend app when a user loads a frontend-only route.

This currently doesn't work. I think DS is trying to serve

@app/frontend/index.html/leftovers/4/update

I think the handler target path should be stat'd, then:

Note previous issue related to this is #8

teleclimber commented 2 years ago

Fixed in 41086d00e34b688dea4760e2f646c81b32e56143