refactor: use environment variable for GHOST_API_KEY
Replace hardcoded GHOST_API_KEY with process.env.GHOST_API_KEY in API routes to enhance security. Update Docker commands in the CI workflow to pass the GHOST_API_KEY as an environment variable. Add GHOST_API_KEY to the Next.js configuration for consistent access across the application.
This commit is contained in:
@@ -3,7 +3,7 @@ import { NextResponse } from "next/server";
|
||||
export const runtime = "nodejs"; // Force Node runtime
|
||||
|
||||
const GHOST_API_URL = "http://192.168.179.31:2368";
|
||||
const GHOST_API_KEY = "067b8434f2e7f2a771dfcc45a7"; // Replace with your actual key
|
||||
const GHOST_API_KEY = process.env.GHOST_API_KEY;
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
|
||||
Reference in New Issue
Block a user