Issue :IOS, MacOS
Browser: Safari
Software: WordPress , Ionic Framework
Solutions:
Add the code below to your current theme function file.
add_action('rest_api_init', function() {
remove_filter('rest_pre_serve_request', 'rest_send_cors_headers');
add_filter('rest_pre_serve_request', function($value) {
header('Access-Control-Allow-Origin: *'); // Or specify allowed origins
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE');
header('Access-Control-Allow-Credentials: true');
return $value;
});
});

