I am integrating Ignition WebDev (HTML/JS) with a Python Flask API chatbot using OpenAI LLM.
Architecture:
Ignition WebDev UI → Flask API (/chat) → OpenAI API → response
Backend
Flask running on 0.0.0.0:5000
Endpoint: POST /chat
Flask-CORS enabled
Returns JSON response from OpenAI API
Frontend (Ignition WebDev)
fetch("http://10.11.12.84:5000/chat", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
message: msg
})
})
Issue Summary
- Only OPTIONS requests appear
Flask logs show:
OPTIONS /chat 200
No POST request is reaching the backend.
- Frontend connection error
Frontend returns:
{
"error": "Connection error.",
"success": false
}
3. Method Not Allowed on browser test
Opening /chat in browser returns:
Method Not Allowed
4. CORS / preflight issue suspected
Even with flask_cors.CORS(app) enabled, POST request is not executed.
- Network / firewall uncertainty
Tried multiple URLs:
127.0.0.1:5000
myipxxx:5000
But Ignition WebDev cannot reliably reach Flask API.
Need help with:
Correct Ignition WebDev → Flask integration approach
Handling CORS + OPTIONS preflight properly
Required network/firewall configuration for LAN communication
Recommended architecture for Ignition + external Python API