Commit 6ca8e6a
committed
feat: implement secure backend proxy with Supabase Edge Functions
- Add generate-prompt Edge Function to prevent API key exposure
- Move AI API calls from frontend to secure backend
- Configure Deno runtime with TypeScript support
- Add CORS headers for cross-origin requests
- Implement fallback from Gemini to OpenRouter
- Store API keys in Supabase Vault instead of frontend bundle1 parent 4e9aaa1 commit 6ca8e6a
2 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| |||
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
92 | | - | |
| 108 | + | |
93 | 109 | | |
94 | 110 | | |
95 | 111 | | |
| |||
0 commit comments