Security audit #1
This commit is contained in:
parent
68bc591150
commit
cd04d34b23
8 changed files with 131 additions and 56 deletions
|
|
@ -1,19 +1,16 @@
|
|||
import path from 'path';
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, '.', '');
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
server: {
|
||||
port: 5173,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
plugins: [react()],
|
||||
define: {
|
||||
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
||||
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
|
||||
},
|
||||
// SECURITY: Do NOT expose GEMINI_API_KEY to frontend - use /api/generate endpoint
|
||||
define: {},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '.'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue