I have a SpringBoot ap. with this method in the controller:
@GetMapping(value = "/")
public String home(Model model, HttpServletRequest request) {
System.out.println("home ->" + request.getRequestURI() + "<-");
}
but when I do from the console:
curl localhost:7080
curl localhost:7080/./
curl localhost:7080/../
curl localhost:7080/..
I always get the same result: home ->/<-
and the same result with the browser. and I would like to return 404 for all the mapping that are not localhost:7080
I've tried:
MacBook-Pro-de-nunito:~ nunito$ curl --path--as-is localhost:7080/./
curl: option --path--as-is: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
curl --version
curl 7.64.1 (x86_64-apple-darwin20.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.41.0
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets