Add check for exact path match
HttpExchange just checks startsWith, so would also match /api/v1/rpcfoobar
This commit is contained in:
parent
0c4642aa20
commit
36abb8ae8f
@ -66,6 +66,10 @@ public class HttpServerHandler {
|
||||
}
|
||||
|
||||
private void handleRpcEndpoint(HttpExchange httpExchange) throws IOException {
|
||||
if (!"/api/v1/rpc".equals(httpExchange.getRequestURI().getPath())) {
|
||||
sendResponse(404, null, httpExchange);
|
||||
return;
|
||||
}
|
||||
if (!"POST".equals(httpExchange.getRequestMethod())) {
|
||||
sendResponse(405, null, httpExchange);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user