refactor: use request attributes instead of merge for middleware data transfer

- Replace request->merge() with request->attributes->set() in Server middleware to avoid polluting user input
- Add getNodeInfo() helper method in UniProxyController for cleaner node info access
- Update all node_info references to use the new attribute-based approach
This commit is contained in:
xboard committed 2025-05-24 13:54:57 +08:00
1 parent b271238094
commit 66f9b58393
2 files changed
+15 -7

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ class Server
throw new ApiException('Server does not exist');
}
$request->merge(['node_info' => $serverInfo]);
$request->attributes->set('node_info', $serverInfo);
return $next($request);
}