|
|
|
@ -20,6 +20,14 @@ public class WebHandler extends BaseHandler { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean doGet(Path path, HttpExchange ex) throws IOException { |
|
|
|
public boolean doGet(Path path, HttpExchange ex) throws IOException { |
|
|
|
LOG.log(DEBUG,"doGet({0},ex)",path); |
|
|
|
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
|
|
|
|
// 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
|
|
|
|
// the index page itself references required elements with absolute path: /assets/index-x.js
|
|
|
|
var first = path.isEmpty() ? null : path.firstElement(); |
|
|
|
var first = path.isEmpty() ? null : path.firstElement(); |
|
|
|
|