Fix Ghost API environment variables on server

cgen-2c85504cd7df4e2282ced88bcdff4f73
This commit is contained in:
Builder.io 2025-11-15 20:22:56 +00:00
parent 7d26b3d2b4
commit f0f641de14

View file

@ -34,8 +34,8 @@ interface GhostApiResponse {
}
async function fetchFromGhost(slug: string): Promise<any | null> {
const ghostUrl = process.env.VITE_GHOST_API_URL;
const ghostKey = process.env.VITE_GHOST_CONTENT_API_KEY;
const ghostUrl = process.env.GHOST_API_URL || process.env.VITE_GHOST_API_URL;
const ghostKey = process.env.GHOST_CONTENT_API_KEY || process.env.VITE_GHOST_CONTENT_API_KEY;
if (!ghostUrl || !ghostKey) {
return null;