From 7806001c1d7dcc51e4a2fac5410c6f76841ce1e1 Mon Sep 17 00:00:00 2001 From: shane ubento Date: Wed, 19 Mar 2025 11:44:50 +0100 Subject: [PATCH] READ ME cros update --- z1/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/z1/README.md b/z1/README.md index 6366c18..85caebb 100644 --- a/z1/README.md +++ b/z1/README.md @@ -41,4 +41,12 @@ http://[ip address you copied]:5000 ## Cross-Origin Resource Sharing (CORS) -Since frount end (Apache) +Since the frontend (Apache) and backend (Flask) run on different ports, Cross-Origin Resource Sharing (CORS) has been enabled in the Flask backend using [`Flask-CORS`](https://flask-cors.readthedocs.io/en/latest/). + +Specifically, the following configuration was added to the Flask backend (`app.py`): + +from flask_cors import CORS +app = Flask(name) +CORS(app) # Enables CORS for all routes and origins + +This allows the frontend JavaScript code to successfully communicate with the backend API without browser security restrictions.