mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
fix: reduce excessive POST /api/auto-mode/context-exists requests
Two changes: 1. Server: Skip morgan logging for context-exists endpoint (like health check) 2. UI: Use a stable fingerprint (feature IDs + statuses) instead of the unstable features array reference as the useEffect dependency. This prevents re-checking context for all features on every React Query refetch when the actual feature set hasn't changed.
This commit is contained in:
@@ -261,7 +261,10 @@ morgan.token('status-colored', (_req, res) => {
|
||||
app.use(
|
||||
morgan(':method :url :status-colored', {
|
||||
// Skip when request logging is disabled or for health check endpoints
|
||||
skip: (req) => !requestLoggingEnabled || req.url === '/api/health',
|
||||
skip: (req) =>
|
||||
!requestLoggingEnabled ||
|
||||
req.url === '/api/health' ||
|
||||
req.url === '/api/auto-mode/context-exists',
|
||||
})
|
||||
);
|
||||
// CORS configuration
|
||||
|
||||
Reference in New Issue
Block a user