Update api.php

fix for Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers.