READ ME cros update

This commit is contained in:
Muhammed Tariq Ali Razvi 2025-03-19 11:44:50 +01:00
parent c15a404098
commit 7806001c1d

View File

@ -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.