Fix Mixed Content issue on staging (HTTPS/HTTP mismatch)
- Add Next.js API rewrites to proxy /api and /uploads requests - Update docker-compose.staging.yml to use relative API paths - Set NEXT_PUBLIC_API_URL to empty for staging (use rewrites) - Add BACKEND_URL env var for Next.js server-side proxying - Update all files to use relative paths when API_URL is empty This fixes the issue where the staging site (HTTPS) was trying to load resources from HTTP backend, causing Mixed Content errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import { useAuthStore } from '@/lib/store';
|
||||
import { useTranslation } from '@/lib/i18n';
|
||||
import SidebarLayout from '@/components/SidebarLayout';
|
||||
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || '';
|
||||
|
||||
interface CCPackage {
|
||||
id: number;
|
||||
|
||||
@@ -6,7 +6,7 @@ import Link from 'next/link';
|
||||
import { useAuthStore } from '@/lib/store';
|
||||
import { useTranslation } from '@/lib/i18n';
|
||||
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || '';
|
||||
|
||||
interface CheckoutResult {
|
||||
status: string;
|
||||
|
||||
Reference in New Issue
Block a user