访问域名时跳转到/index
This commit is contained in:
parent
78747c60eb
commit
27ceed8f4a
@ -30,8 +30,13 @@ public class PersonalController {
|
|||||||
this.localService = localService;
|
this.localService = localService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/")
|
||||||
|
public void index(HttpServletResponse resp) throws IOException {
|
||||||
|
resp.sendRedirect("/index");
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/files")
|
@GetMapping("/files")
|
||||||
public String file(String path) throws IOException {
|
public String file(String path){
|
||||||
return personalService.getFiles(path);
|
return personalService.getFiles(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,11 @@ public class PublicController {
|
|||||||
this.queryService = queryService;
|
this.queryService = queryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/")
|
||||||
|
public void index(HttpServletResponse resp) throws IOException {
|
||||||
|
resp.sendRedirect("/index");
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/ip")
|
@GetMapping("/ip")
|
||||||
public void ip(HttpServletRequest request, String auth, HttpServletResponse response) throws IOException {
|
public void ip(HttpServletRequest request, String auth, HttpServletResponse response) throws IOException {
|
||||||
String ip = request.getHeader("X-Forwarded-For");
|
String ip = request.getHeader("X-Forwarded-For");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user