mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 22:09:28 +00:00
feat(auth): add demo mode support using PUBLIC_DEMO_MODE
This commit is contained in:
@@ -29,7 +29,7 @@ export const authMiddleware = createMiddleware<{
|
||||
|
||||
c.set('user', user)
|
||||
|
||||
if (process.env.REVIEWER_READ_ONLY === '1') {
|
||||
if (process.env.PUBLIC_DEMO_MODE === '1') {
|
||||
const method = c.req.method.toUpperCase()
|
||||
const path = c.req.path
|
||||
if (['POST', 'PUT', 'PATCH', 'DELETE'].includes(method) && !path.endsWith('/search')) {
|
||||
|
||||
Reference in New Issue
Block a user