fix: replace hardcoded localhost:3001 URLs with relative paths
All checks were successful
Deploy / deploy (push) Successful in 13s
All checks were successful
Deploy / deploy (push) Successful in 13s
Fixes CORS errors when deployed behind a reverse proxy by removing hardcoded localhost references in Brands.jsx and PostCard.jsx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ export default function PostCard({ post, onClick, onMove, compact = false }) {
|
||||
>
|
||||
{post.thumbnail_url && (
|
||||
<div className="w-[calc(100%+1.5rem)] h-32 -mx-3 -mt-3 mb-2 rounded-t-lg overflow-hidden">
|
||||
<img src={`http://localhost:3001${post.thumbnail_url}`} alt="" className="w-full h-full object-cover" />
|
||||
<img src={post.thumbnail_url} alt="" className="w-full h-full object-cover" />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { AppContext } from '../App'
|
||||
import Modal from '../components/Modal'
|
||||
import { SkeletonCard } from '../components/SkeletonLoader'
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001/api'
|
||||
const API_BASE = '/api'
|
||||
|
||||
const EMPTY_BRAND = { name: '', name_ar: '', priority: 2, icon: '' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user