我試圖從耐克商店網站使用Angulars $ http請求獲得當前男士清倉鞋並將其顯示在我自己的網站上。耐克沒有「訪問控制允許來源」標題出現在請求的資源
$http({
method: 'GET',
url: 'http://store.nike.com/html-services/gridwallData?country=US&lang_locale=en_US&gridwallPath=mens-clearance-shoes/'
}).then(function successCallback(response) {
console.log('success',response);
}, function errorCallback(response) {
console.log('error',response);
});
但是,它給了我這個錯誤。
XMLHttpRequest cannot load http://store.nike.com/html-services/gridwallData?country=US&lang_locale=en_US&gridwallPath=mens-clearance-shoes/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
我知道它是跨源的資源共享issuse。有沒有辦法通過這個?我也可以合法地在我的網站上展示他們的清關產品嗎?
*「和也可以我在法律上展示自己的產品清除我的網站上?」 *我們不能回答這個問題。 *「有沒有辦法通過這個」*是的,就像繞過CORS限制的許多其他相同問題所描述的一樣。 –
爲什麼不呢?他們的api是公開的,我可以在我自己的網站上使用它嗎?我應該在stacklaw中提問嗎? –