Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

CORS policy workaround #55

Closed
piotrmerton opened this issue Mar 2, 2021 · 5 comments
Closed

CORS policy workaround #55

piotrmerton opened this issue Mar 2, 2021 · 5 comments

Comments

@piotrmerton
Copy link

For anyone encountering CORS policy errors, try using this as a host:

'host': "https://images" + ~~(Math.random() * 3333) + "-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=https://www.instagram.com/"

Solution provided by @colinchadwick here jsanahuja/jquery.instagramFeed#103 (comment)

@QuranIslam
Copy link

Sorry but I think it is not working
image

@jsanahuja
Copy link
Owner

Implemented in 3.0.1. Highly recommended to set the host parameter as follow:
'host': "https://images" + ~~(Math.random() * 3333) + "-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=https://www.instagram.com/" this parameter

@jsanahuja
Copy link
Owner

jsanahuja commented Mar 2, 2021

Sorry but I think it is not working
image

This is because you are doing the requests without a server (referer header). You should try using a web server as it was stated here: jsanahuja/jquery.instagramFeed#117

@jsanahuja jsanahuja pinned this issue Mar 2, 2021
@RomainDW
Copy link

RomainDW commented Mar 3, 2021

The fix creates a new problem for me: Cross-Origin Read Blocking (CORB) blocked cross-origin response https://www.instagram.com/p/CL7rMUKDOaR/ with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

Images don't display and have a URL like this instead: https://lookaside.instagram.com/seo/google_widget/crawler/?media_id=2520798378721076881

image

@jsanahuja
Copy link
Owner

lookaside.instagram.com/seo/google_widget/crawler/?

Please open a new issue with information to reproduce it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants