imbajin commented on code in PR #2945:
URL:
https://github.com/apache/incubator-hugegraph/pull/2945#discussion_r2731183658
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/controller/PartitionAPI.java:
##########
@@ -189,6 +192,16 @@ public Map<String, Object>
cleanPartition(@PathVariable(value = "id") int id) th
@GetMapping(value = "/arthasstart", produces = "application/json")
public Map<String, Object> arthasstart(
@RequestParam(required = false, defaultValue = "") String flags) {
+ String remoteAddr = ((ServletRequestAttributes) Objects.requireNonNull(
+
RequestContextHolder.getRequestAttributes())).getRequest().getRemoteAddr();
+
+ boolean isLocalRequest = "127.0.0.1".equals(remoteAddr) ||
+ "[0:0:0:0:0:0:0:1]".equals(remoteAddr);
+ if (!isLocalRequest){
Review Comment:
⚠️ **Code style: Missing space before brace**
Per project style conventions (line length 100 chars, consistent formatting):
```suggestion
if (!isLocalRequest) {
```
##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/controller/PartitionAPI.java:
##########
@@ -225,6 +238,13 @@ public Map<String, Object> okMap(String k, Object v) {
return map;
}
+ public Map<String, Object> forbiddenMap(String k, Object v){
Review Comment:
⚠️ **Code style: Missing space before brace in method signature**
```suggestion
public Map<String, Object> forbiddenMap(String k, Object v) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]