Skip to content Skip to sidebar Skip to footer

Flask/flask-cors: Cors Header ‘access-control-allow-origin’ Missing

I'm trying to link a Flask backend, running locally on port 5000 with a Vue.js frontend, running locally on port 8080. I'm able to successfully signup and login, but fail to submit

Solution 1:

Have you tried adding the port to the localhost entry?

#settings.py
    CORS_ORIGIN_WHITELIST = [
        'http://0.0.0.0:4100',
        'http://localhost:4100',
        'http://0.0.0.0:8000',
        'http://localhost:8000',
        'http://0.0.0.0:4200',
        'http://localhost:4200',
        'http://0.0.0.0:4000',
        'http://localhost:4000',
        'http://localhost:8080',
        'http://0.0.0.0:8080',
        'http://127.0.0.1:8080',
        'http://192.168.100.6:8080',
        'localhost:8080'
    ]

Post a Comment for "Flask/flask-cors: Cors Header ‘access-control-allow-origin’ Missing"