File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ The project uses the following tables in Supabase:
104104 VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
105105 ` ` `
106106
107+ - [ ] Never expose non-` VITE_` secrets to frontend bundle
108+
109+
1071104. ** Run the development server**
108111 ` ` ` bash
109112 npm run dev
Original file line number Diff line number Diff line change 11export default async function handler ( req , res ) {
2- const apiKey = process . env . WAKATIME_API_KEY || process . env . VITE_WAKATIME_API_KEY ;
2+ const apiKey = process . env . WAKATIME_API_KEY ;
33
44 if ( ! apiKey ) {
55 return res . status ( 500 ) . json ( { error : 'Server Configuration Error: Missing API Key' } ) ;
Original file line number Diff line number Diff line change 11import path from 'path' ;
2- import { defineConfig , loadEnv } from 'vite' ;
2+ import { defineConfig } from 'vite' ;
33import react from '@vitejs/plugin-react' ;
44
5- export default defineConfig ( ( { mode } ) => {
6- const env = loadEnv ( mode , process . cwd ( ) , '' ) ;
5+ export default defineConfig ( ( ) => {
76 return {
87 server : {
98 port : 3000 ,
109 host : '0.0.0.0' ,
1110 } ,
1211 plugins : [ react ( ) ] ,
13- define : {
14- 'process.env.API_KEY' : JSON . stringify ( env . GEMINI_API_KEY ) ,
15- 'process.env.GEMINI_API_KEY' : JSON . stringify ( env . GEMINI_API_KEY )
16- } ,
1712 resolve : {
1813 alias : {
1914 '@' : path . resolve ( __dirname , '.' ) ,
You can’t perform that action at this time.
0 commit comments