Fix admin routes path for Traefik reverse proxy
Traefik strips the /api prefix before forwarding requests to the backend, so /api/admin requests arrive as /admin. Changed route mounting from /api/admin to /admin to match the actual incoming request path.
This commit is contained in:
@ -147,8 +147,8 @@ app.use('/auth', authRoutes);
|
||||
// Mount activity routes
|
||||
app.use('/activity', activityRoutes);
|
||||
|
||||
// Mount admin routes
|
||||
app.use('/api/admin', adminRoutes);
|
||||
// Mount admin routes (Traefik strips /api prefix, so /api/admin becomes /admin)
|
||||
app.use('/admin', adminRoutes);
|
||||
|
||||
// Health check endpoint
|
||||
app.get('/health', (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user