2026-04-20-10-14-09 - 安全加固:XOR→AES-GCM、API Key环境变量化、授权码SHA-256哈希、消除硬编码密钥
This commit is contained in:
@@ -9,6 +9,11 @@ export default defineConfig(({mode}) => {
|
||||
plugins: [react(), tailwindcss()],
|
||||
define: {
|
||||
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
||||
'process.env.STORAGE_KEY': JSON.stringify(env.STORAGE_KEY),
|
||||
'process.env.DEFAULT_API_KEY': JSON.stringify(env.DEFAULT_API_KEY),
|
||||
'process.env.ADMIN_AUTH_HASH': JSON.stringify(env.ADMIN_AUTH_HASH),
|
||||
'process.env.ADMIN_AUTH_SALT': JSON.stringify(env.ADMIN_AUTH_SALT),
|
||||
'process.env.LEGACY_STORAGE_KEY': JSON.stringify(env.LEGACY_STORAGE_KEY),
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
@@ -17,7 +22,7 @@ export default defineConfig(({mode}) => {
|
||||
},
|
||||
server: {
|
||||
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
||||
// Do not modifyâfile watching is disabled to prevent flickering during agent edits.
|
||||
// Do not modify—file watching is disabled to prevent flickering during agent edits.
|
||||
hmr: process.env.DISABLE_HMR !== 'true',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user