-
Notifications
You must be signed in to change notification settings - Fork 104
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
No 'Access-Control-Allow-Origin' header is present on the requested resource. #105
Comments
This package must be used in backend. The AWS credentials are very delicate. |
I am using this on the backend (node js) but then i get the same error. No 'Access-Control-Allow-Origin' header is present on the requested resource |
Edit: Here is a snippet of my code. @JuanCrg90 If you could please point me in the right direction. I am using webpack.
|
I have the same problem No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.'. My problem was partially solved when I add this extension : https://chrome.google.com/webstore/detail/cors-toggle/jioikioepegflmdnbocfhgmpmopmjkim to my chrome browser. Maybe we must add domain on amazon partnairs website ? If anybody had a better way to solved this issue, you're welcome. |
Why does it say "Client" if it must be used on the server side? |
@arhoy Client is any tool that you can use to communicate with the service (not only a web browser) for example a google home or Alexa could be a client for a webservice. |
I see thanks Juan very much for clarifying!
How can I solve this then? If I am rendering server side, than I can create
an API which calls Amazons API on the backend. Then use my API on the front
end of my React App?
Is that the correct way?
Thank you!
…On Sat, Dec 28, 2019 at 8:52 PM Juan Carlos Ruiz González < ***@***.***> wrote:
@arhoy <https://github.com/arhoy> Client is any tool that you can use to
communicate with the service (not only a web browser) for example a google
home or Alexa could be a client for a webservice.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#105?email_source=notifications&email_token=ACPMK7ID4ZQ3LMUUNJT7TK3Q3ANIHA5CNFSM4EKAX2GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYXFVQ#issuecomment-569471702>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPMK7J34LWSBH46YPJ36OTQ3ANIHANCNFSM4EKAX2GA>
.
|
Does anyone have a solution for this? I have created a Vue app which have a separate back-end on my localhost. I can search products fine with chrome CORS extension. But if CORS extension is active then i can't submit products data to Firestore database. So in order to submit, i have to disable CORS extension.. This process is painful as each time i make search, i have to enable CORS and then disable it for data submission in Chrome. But then there is another issue which i don't know how to get around. As i searched for 10 products and added them to firebase. Now i need to filter out those 10 products from new amazon search response.. In this case, both firebase and amazon api need to work at the same time. So i can get ASIN list in an array from firestore db and then use filter method to return only products which are not in firestore db. Here i'm stuck as how to proceed because of this CORS issue.. I found this topic on stackoverflow but that top answer with CORS proxy is for response to a direct URL. If there is a way to use cors npm package in this case. https://www.npmjs.com/package/cors Can someone explain how? Any solution would be appreciated. OR if someone can explain how to use this package properly in back-end without this cors issue. Thanks |
I'm trying to test the code in the documentation but I'm receiving this error:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
I'm using this in a React app, here is the code for the function from the component:
The text was updated successfully, but these errors were encountered: