fixed legacy redirects
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -29,7 +29,8 @@ public class CompanyLegacy extends BaseHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
if (path.empty()) return sendRedirect(ex, url(ex).replaceAll("/legacy/","/"));
|
||||
var url = url(ex);
|
||||
if (path.empty() || url.endsWith("/view")) return sendRedirect(ex, url.replaceAll("/legacy/","/"));
|
||||
return super.doGet(path, ex);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ public class NotesLegacy extends BaseHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
if (path.empty()) return sendRedirect(ex, url(ex).replaceAll("/legacy/","/"));
|
||||
var url = url(ex);
|
||||
if (path.empty() || url.endsWith("/view")) return sendRedirect(ex, url.replaceAll("/legacy/","/"));
|
||||
return super.doGet(path, ex);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ public class ProjectLegacy extends BaseHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
if (path.empty()) return sendRedirect(ex, url(ex).replaceAll("/legacy/","/"));
|
||||
var url = url(ex);
|
||||
if (path.empty() || url.endsWith("/view")) return sendRedirect(ex, url.replaceAll("/legacy/","/"));
|
||||
return super.doGet(path, ex);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ public class TaskLegacy extends BaseHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
if (path.empty()) return sendRedirect(ex, url(ex).replaceAll("/legacy/","/"));
|
||||
var url = url(ex);
|
||||
if (path.empty() || url.endsWith("/view")) return sendRedirect(ex, url.replaceAll("/legacy/","/"));
|
||||
return super.doGet(path, ex);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user