Spaces:
Running
Running
Remove sensitive debug logging of API key
Browse files
proxy.ts
CHANGED
|
@@ -6,7 +6,7 @@ export function proxy(request: NextRequest) {
|
|
| 6 |
if (request.nextUrl.pathname.startsWith("/api")) {
|
| 7 |
const apiKey = request.headers.get("x-api-key");
|
| 8 |
const validApiKey = process.env.API_KEY;
|
| 9 |
-
|
| 10 |
|
| 11 |
// Check if API key matches (or if environment variable is not set, fail safe)
|
| 12 |
if (!validApiKey || apiKey !== validApiKey) {
|
|
|
|
| 6 |
if (request.nextUrl.pathname.startsWith("/api")) {
|
| 7 |
const apiKey = request.headers.get("x-api-key");
|
| 8 |
const validApiKey = process.env.API_KEY;
|
| 9 |
+
|
| 10 |
|
| 11 |
// Check if API key matches (or if environment variable is not set, fail safe)
|
| 12 |
if (!validApiKey || apiKey !== validApiKey) {
|