READ ME cros update
This commit is contained in:
parent
c15a404098
commit
7806001c1d
10
z1/README.md
10
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.
|
||||
|
Loading…
Reference in New Issue
Block a user