Flask : No 'Access-Control-Allow-Origin' header is present on the requested resource

I have a flask API which is deployed on gCloud. It is working fine locally and using postman but when I try to call it from React(front-end), it gives following error.

Access to XMLHttpRequest at 'linkA' from origin 'linkB' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried following solutions.

  1. Using Flask-CORS
  2. Using specific Flask Decorator

Here is my app.py

from flask_cors import CORS
app = Flask(__name__)
CORS(app)
#cors = CORS(app, supports_credentials=True,resources={r"/*": {"origins": "https://my.frontend,link/"}})
app.register_blueprint(user_features_blueprint, url_prefix='/user/')
port = int(os.environ.get('PORT', 8080))
if __name__ == '__main__':
    app.run(threaded=True, host='0.0.0.0', port=port)

Here is my blueprint

from flask_cors import CORS, cross_origin

user_features_blueprint = Blueprint('user_feature_blueprint', __name__)
CORS(user_features_blueprint)
#CORS(user_features_blueprint,supports_credentials=True,resources={r"/*": {"origins": "*"}})

def _build_cors_prelight_response():
    response = make_response()
    response.headers.add("Access-Control-Allow-Origin", "*")
    response.headers.add('Access-Control-Allow-Headers', "*")
    response.headers.add('Access-Control-Allow-Methods', "*")
    return response

def search_users_by_name():
    if request.method == "OPTIONS":  # CORS preflight
        return _build_cors_prelight_response()
    ....#my code
    response = my_function()
    #response.headers['Access-Control-Allow-Origin'] = '*'
    return response

I have almost tried all of the solutions available on stackoverflow but none works, I wonder if it has something to do with gCloud but I didn't find anything related to that.

Following solutions are already tried.

Solution1 , Solution2