on 06-04-2021 3:50 PM
Hi Experts,
I am trying to access a Odata service at a remote location. But I am getting CORS error.
I learned somewhere that there is a way to run the application locally by configuring local proxy.
Please let me know how can i create this local proxy and run my app in order to bypass CORS error.
Please note: I am using Visual Studio Code for development, using Open UI5 and need to run the app locally. Not using any destination at all.
Regards,
Anand
See this answer. In your case, the simple proxy middleware should be sufficient. Here is a sample repo that uses the middleware and an OData V4 sample service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @boghyon.hoffmann,
Sorry for late reply as I was on leave.
I have made the changes as suggested by you but my application still do not work.
After making the changes I am running my app using npm run start. But it do not pick up the "middleware proxy" whcih we created and this my OData service do not work.
Please let me know If I am missing any thing
Regards,
Anand
Hi anand.rai01
It's difficult to tell what's missing without any information.
anand.rai01 Is the newer answer https://stackoverflow.com/a/76554715/5846045 more helpful?
User | Count |
---|---|
67 | |
8 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.