Without ^~ the generic ~* regex block for static extensions matched
first, falling back to root /opt/moneyflix/crm where no assets/ dir
exists → 404 for all CSS/JS.
^~ /assets/ takes precedence over regex blocks, aliasing to
crm/Views/assets/ where the complete asset set lives.
Co-Authored-By: Paperclip <[email protected]>
When the app runs behind a reverse proxy (NPM), SERVER_PORT was 8080
(the backend port) causing asset URLs to include :8080 even though
clients access via HTTPS on port 443.
Priority: if APP_URL is set in the environment, use it directly.
Fallback: honour X-Forwarded-Proto and X-Forwarded-Port headers before
falling back to the raw SERVER vars.
Fixes crm-moneyflix.bitreport.pt asset URLs generating :8080 suffix.
Co-Authored-By: Paperclip <[email protected]>
findRootPath() fell back to /opt/bitreport when composer.json lives
under crm/ with Modules/, breaking auth layout resolution and /login 500.
Co-authored-by: Cursor <[email protected]>
Lock file was pinned to symfony/filesystem v7.3.2 which requires PHP >= 8.2.
LXC runs PHP 8.1.34 (Ubuntu 22.04 PPA). Ran composer update on production CT
to resolve v6.4.39 (compatible with PHP 8.1+).
Smoke: all 5 checks pass on CT 241 (10.10.50.37).
Paperclip-Issue: BIT-24694
- tools/proxmox/extract_db_from_pbs.sh: restores a PBS backup to an
air-gapped temp CT (no net0), dumps MariaDB to a .sql.gz, then destroys
the temp CT. Handles root no-pass, moneyflix.env creds, and --list mode.
- tools/proxmox/install_moneyflix_stack.sh: adds PROD_DB_DUMP env var;
when set to a .sql.gz dump from PBS extraction, imports production data
instead of applying the empty lab schema. Strips DEFINER clauses for
clean import under a different user.
Paperclip-Issue: BIT-24694
Paperclip-Run: fda0935a-f525-46a5-81a0-6d63da4188cf
Lab bootstrap scripts exercise CRM PHP, Node redirector, health endpoints, and
MySQL analytics on 10.10.50.17. Bearer auth is checked before session dev-login;
redirector reads CRM_API_URL at fetch time so dotenv applies correctly.
Paperclip-Task: BIT-24693
Paperclip-Run: 3467cbf0-a91f-4cb0-808a-ccb043de28d3
Co-authored-by: Cursor <[email protected]>
SEV-1: Remove hardcoded credentials per BIT-1876 credential safety rules.
Changes:
- moneyflix.config: Remove DB_PASS and API_KEY plaintext values
- nodejs-redirector/ecosystem.config.cjs: Use process.env for sensitive credentials
- README_MONEYFLIX.md: Replace real credentials with placeholders
- nodejs-redirector/README.md: Replace real credentials with placeholders
- README.md: Replace real credentials with placeholders
- docs/MONEYFLIX_CLIENT_CONFIGURATION.md: Replace real credentials with placeholders
- docs/README.md: Replace real credentials with placeholders
- crm/README.md: Replace real credentials with placeholders
- Add credentials-hygiene-plan.md for reference
Note: This removes credentials from Git but does NOT change production values.
Production credential rotation requires explicit human approval.
Paperclip-*:
- Issue: BIT-24692
- Agent: e34f1b0f-62db-487c-8584-f6a47203f7b5
- UrlKey: nelson-baptista
- Substituir "usando" por "com" ou "através de" onde apropriado
- Corrigir "adicionar à fila para depois" para "adicionar à fila para processamento posterior"
- Melhorar clareza e correção gramatical nos comentários
- Remove entire conditional CSS blocks that were WDMI-specific
- These gradient styles were not needed for MoneyFlix
- Clean up main.php and public-blank.php layouts
- Remove ScriptBuilderService and ScriptBuilderIntegrationService (CRM-specific)
- Update controllers to use GoogleSheetsService instead
- Disable script generation/deployment functionality temporarily
- Fix creative count TODO in AdvertisingController
- Clean up module service registrations
- Restore clean User Views files
ScriptBuilder functionality is specific to the main CRM and not needed for MoneyFlix.
- Add apiResolveAllErrors endpoint to resolve all open errors at once
- Add apiClearAllErrors endpoint to clear all errors
- Update ErrorLog model with new methods
- Add migration for raw_request column in redirect_stats
- Complete view/click tracking functionality
- Add source maps and license files for compiled assets
- Add debug and test files for development
- Complete Git repository with all necessary files for MoneyFlix project
- Add complete Auth module with login, logout, lock screen functionality
- Fix 401 error on error monitoring page by adding /error-monitoring/ to public patterns
- Improve lock screen with proper form handling and unlock functionality
- Add RoleModel and role management views
- Add BaseModel for common model functionality
- Update authentication system and middleware
- Add troubleshooting documentation
- Update assets and build tools
- Create UserActivitiesTable migration for tracking user activities
- Create UserActivityModel for managing activity data
- Replace mock data in apiGetRecentActivity with real database data
- Remove all mock/fake data from the project
- Check if user is logged in and admin, OR if using valid API key
- This allows API access with Bearer token authentication
- Fixes 'Acesso negado' error for API key requests
- Remove redundant requireAuth call since apiOrAuth middleware handles authentication
- This was causing 'Authentication required' error even with valid API key
- Change all user API routes to use apiOrAuth middleware
- This allows API access with Bearer token authentication
- Fixes 302 redirects for API endpoints
- Create migration AddLastLoginToUsers to add last_login column
- Revert UserModel to use last_login column in queries
- Proper solution: add missing column instead of removing from code
- Fix getAllForAdmin method to not select last_login column
- Fix findForAdmin method to not select last_login column
- Users table doesn't have last_login column