mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue