Files
ayrisapart/lib/cloudinary.ts
T
ayrisdevandClaude Sonnet 4.6 029e95e01b security: remove exposed Cloudinary credentials from client bundle
- Strip NEXT_PUBLIC_ prefix from CLOUDINARY_API_KEY and API_SECRET so
  they stay server-side only and are never shipped to the browser
- Update lib/cloudinary.ts to read the renamed env vars
- Remove cloudinary-assets.json from git tracking and add to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 18:09:43 +03:00

12 lines
320 B
TypeScript

import { v2 as cloudinary } from 'cloudinary';
// Configure Cloudinary with environment variables
cloudinary.config({
cloud_name: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
secure: true,
});
export default cloudinary;