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
2025-05-24 13:54:57 +08:00
parent bf3a9112f2
commit fdb5b222b9
2 changed files with 15 additions and 7 deletions

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);
}