-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Control Allow Origin #34
Comments
Wanted to bump this issue -- trying to get this package working in browser. I'm running chrome now and getting I have tried adding headers to the request in the package in return _.assign({}, optionalOptions, {
resolveWithFullResponse: true,
jar: cookiejar,
// new headers here
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Methods': '*'
},
}); and I get a slightly different error message: Is this an issue with the package, or do I have to configure something in my code? I know that CORS has to do with finance.yahoo.com being different from my current url domain, which is localhost, but I feel like this package should be able to work out of the box. If there are any fixes, let me know. The package works fine in Node.js, which won't complain about CORS, unlike browsers. |
I figured out how to fix the CORS solution. In const PROXY_URL = 'https://cors-anywhere.herokuapp.com/';
exports.HISTORICAL_CRUMB_URL = PROXY_URL + 'finance.yahoo.com/quote/$SYMBOL/history';
exports.HISTORICAL_DOWNLOAD_URL = PROXY_URL + 'query1.finance.yahoo.com/v7/finance/download/$SYMBOL';
exports.SNAPSHOT_URL = PROXY_URL + 'query2.finance.yahoo.com/v10/finance/quoteSummary/$SYMBOL'; I'm sure there's a way to somehow append this to all URLs without editing the package...I just don't know how to do it. |
Also, as mentioned in the README, I tried passing in the |
Any news on wether the |
I am receiving an Access Control Allow Origin error when I use the
historical
function. I haven't triedsnapshot
function though.No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 500. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Has anyone gotten this? How to fix?
The text was updated successfully, but these errors were encountered: