๐Ÿ” Stock API Connectivity Test

Diagnose frontend-to-backend API connection issues

๐Ÿ“Š Test Summary

Frontend URL: http://85.239.237.116:8090/

Backend API (Direct): http://85.239.237.116:8001/api

Backend API (Through Proxy): http://85.239.237.116:8090/api

Relative Path: /api (recommended for production)

Test 1: Direct API Access (Backend Port 8001)

Tests if backend API responds on port 8001 directly (bypasses nginx proxy)

Test 2: API Through Proxy (Frontend Port 8090)

Tests if API works through nginx proxy on port 8090

Test 3: API Through Relative Path (Recommended)

Tests if API works using relative path /api (same origin)

Test 4: CORS Preflight Check (OPTIONS Request)

Tests if server responds correctly to CORS OPTIONS request

Test 5: Response JSON Parsing

Tests if API response can be parsed as valid JSON

โœ… Recommendations

  1. If Test 1 passes but Test 2 fails: Nginx proxy configuration issue
  2. If Test 2 passes but Test 3 fails: Frontend relative path configuration issue
  3. If Test 3 passes but browser still fails: Browser cache or JavaScript code issue
  4. If Test 4 fails: CORS headers not being sent correctly
  5. If Test 5 fails: API response format is invalid

๐Ÿ’ก Tip: Open browser DevTools (F12) โ†’ Network tab, then run tests to see actual network requests and responses