Add internal authentication configuration and middleware support
- Enable internal authentication via environment variable in .env.example - Update nuxt.config.ts to include internalAuthEnabled check - Modify internal-auth middleware to conditionally enforce authentication based on the new configuration
This commit is contained in:
@@ -51,6 +51,7 @@ export default defineNuxtConfig({
|
||||
databaseUrl: process.env.DATABASE_URL,
|
||||
redisHost: process.env.REDIS_HOST || 'localhost',
|
||||
redisPort: process.env.REDIS_PORT || '6379',
|
||||
internalAuthEnabled: ['true', '1'].includes(process.env.INTERNAL_AUTH_ENABLED || '') || false,
|
||||
internalAuthUsername: process.env.INTERNAL_AUTH_USERNAME || '',
|
||||
internalAuthPassword: process.env.INTERNAL_AUTH_PASSWORD || '',
|
||||
|
||||
@@ -97,4 +98,4 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user