Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ app.use('/api/*', async (c, next) => {
if (c.req.path === '/api/github/callback') return next()
if (c.req.path.startsWith('/api/sentry/')) return next()
if (c.req.path.startsWith('/api/coolify/webhook/')) return next()
// Phase 07: public auth endpoints (login request-link, callback, logout, me).
// The authRouter handles its own auth state internally where needed.
if (c.req.path.startsWith('/api/auth/')) return next()
// Public setup bootstrap (guarded by user-count check inside).
if (c.req.path.startsWith('/api/setup')) return next()
return authMiddleware(c, next)
})
app.use('/api/*', rateLimit({ windowMs: 60_000, max: 120, keyFn: (c) => c.get('userId') || 'anon' }))
Expand All @@ -171,6 +176,8 @@ app.use('/api/*', async (c, next) => {
if (c.req.path === '/api/github/callback') return next()
if (c.req.path.startsWith('/api/sentry/')) return next()
if (c.req.path.startsWith('/api/coolify/webhook/')) return next()
if (c.req.path.startsWith('/api/auth/')) return next()
if (c.req.path.startsWith('/api/setup')) return next()
return requireActiveLicense({ readOnlyOk: true })(c, next)
})

Expand Down
Loading