Fix: CORS and API base URL for music create in staging

- Update CORS config to allow all origins (wildcard first) for better staging support
- Change API fetch base URL from absolute to relative (/) to prevent mixed content blocking
- Add detailed logging in music create page for better debugging
- Update .env.example with better NEXT_PUBLIC_BASE_URL documentation
- Add MUSIK_CREATE_ANALYSIS.md with comprehensive error analysis

Fixes ERR_BLOCKED_BY_CLIENT error when creating music in staging environment

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-03-12 11:27:51 +08:00
parent 0dabc204bc
commit c6c3eebadf
5 changed files with 198 additions and 8 deletions

View File

@@ -12,6 +12,9 @@ WIBU_UPLOAD_DIR=uploads
WIBU_DOWNLOAD_DIR=./download
# Application Configuration
# For local development: NEXT_PUBLIC_BASE_URL=http://localhost:3000
# For staging/production: Set to your actual domain (e.g., https://your-domain.com)
# Using relative URL '/' is recommended for deployment flexibility
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Email Configuration (for notifications/subscriptions)