debug call api and same origin issue