mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 18:14:27 +01:00
Add check for exact path match
HttpExchange just checks startsWith, so would also match /api/v1/rpcfoobar
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user