got api woking by adjusting origin policy in response