Angular / Flask app failing with CORS error after upgrading to macOS Sequoia

Discussão em 'Angular' iniciado por commadelimited, Maio 15, 2025.

  1. I just upgraded to Sequoia and I’m having some odd issues.

    I have an Angular app which runs a Flask backend. They live in the same directory and I map the Flask app (port 5000) as the api for the Angular app (port 4200).

    .
    ├── backend <-- Flask code
    ├── frontend <-- Angular code
    ├── node_modules
    ├── package-lock.json
    ├── package.json
    ├── README.md
    └── requirements.txt


    It’s been running great for like 9 months. But now when I try to load the site, the API layer keeps complaining about CORS permissions.

    Access to XMLHttpRequest at ‘http://localhost:5000/api/exports/vendors’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.


    I’ve already got a Python package which allows for CORS. And as I said, this has been working perfectly as recently as 4 days ago (my last commit).

    api = Blueprint('api', __name__, url_prefix='/api')
    app = Flask(__name__, static_folder='../frontend/dist/mmscripts/browser/', static_url_path='')
    CORS(app)


    While I debug this locally, can anyone think of anything that might have changed with this new OS that might be cause this? This could be related (and I could be an idiot), but I can visit http://localhost:4200/ to view the Angular app, but http://127.0.0.1:4200/ fails. I can load http://localhost:5000/ to view the Flask served version of this app (but it has no hot reloading).

    I’m just baffled why this is failing all of a sudden.

    Continue reading...

Compartilhe esta Página