문제

Getting the target url of a 301 redirect from a shortened URL within AngularJS.

1) The plain old $http.get on a regular website fails with "Access-Control-Origin" not allowed.

2) Then, issuing a JSONP-Call will work, but of course the callback fails when trying to parse the response.

Searched up and down, deleted "X-Requested-With" header with no luck. Any clues?

도움이 되었습니까?

해결책

Seems like this is simply impossible. Workaround: Resolve URLs in backend, which is of course totally inefficient.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top