implemented legacy download links
This commit is contained in:
@@ -20,6 +20,14 @@ public class WebHandler extends BaseHandler {
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
LOG.log(DEBUG,"doGet({0},ex)",path);
|
||||
|
||||
// legacy download links: redirect to new api
|
||||
if ("files/download".equals(path.toString())) {
|
||||
var file = queryParam(ex).get("file");
|
||||
var target = "/api/files/"+file;
|
||||
return sendRedirect(ex,target);
|
||||
}
|
||||
|
||||
// we always need to load the index.html first, when we encounter something like /module/entry/4/view
|
||||
// the index page itself references required elements with absolute path: /assets/index-x.js
|
||||
var first = path.isEmpty() ? null : path.firstElement();
|
||||
|
||||
Reference in New Issue
Block a user