in idea-plugin/src/main/java/com/jetbrains/ide/streamdeck/RemoteActionServer.java [97:116]
public void handle(HttpExchange exchange) throws IOException {
if(!ActionServerSettings.getInstance().getEnable()) return; // || !ActionServerSettings.getInstance().getEnableRemote()
log("RemoteActionServer -> " + exchange.getRequestURI().toString());
String password = ActionServerSettings.getInstance().getPassword();
if(StringUtil.isNotEmpty(password)) {
Headers headers = exchange.getRequestHeaders();
String passwordHeader = headers.getFirst("Authorization");
if(!Objects.equals(password, passwordHeader)) {
respondWithString(exchange, "Bad password provided", "text/plain", 500);
return;
}
}
// http://localhost:21420/api/action/Run
ActionExecutor.performActionUrl(exchange.getRequestURI().toString(),
!ActionServerSettings.getInstance().getFocusOnly());
respondWithJson(exchange, "<status>ok</status>");
}