Closed Aneeshh18 closed 1 year ago
Can i fix it?
Sure give it a try. Let me know if you need any help.
Sure give it a try. Let me know if you need any help.
Yeah, I got an issue you can help me out!! The API_URL is not working for me as you have added cors_url + swiggy restaurant API, and if i use the URL directly without CORS then it's working fine can you help me out with and prerequisites for Using CORS.
To solve the CORS issue I have used netlify redirect . There is netlify.toml file where I have a redirect logic. So for the url
API_URL =
CORS_PROXY_URL + "/dapi/restaurants/list/v5?page_type=DESKTOP_WEB_LISTING&";
will be redirected to https://www.swiggy.com/dapi/restaurants/list/v5?page_type=DESKTOP_WEB_LISTING&.
You can go ahead with whatever works for you and create a PR. I'll review and make the necessary changes
To solve the CORS issue I have used netlify redirect . There is netlify.toml file where I have a redirect logic. So for the url
API_URL = CORS_PROXY_URL + "/dapi/restaurants/list/v5?page_type=DESKTOP_WEB_LISTING&";
will be redirected to
https://www.swiggy.com/dapi/restaurants/list/v5?page_type=DESKTOP_WEB_LISTING&.
You can go ahead with whatever works for you and create a PR. I'll review and make the necessary changes
Can you please help me with the CORS thing? Can you explain from scratch or any resource from where you learned? I'm doing the same but it isn't working for me! I have installed npm netlify cl and all cors 2 I have added the links like cors+dapi... and I have created the netlify.toml file but it is still not working.
you need to run ntl dev
to run the project instead of npm start
Thanks!! What changes need to be done in the netlify server... like if was using npm build so i have to change it to ntl dev?
everything would be same just run the commandntl dev
instead of npm start
rest keep everything as it is.
this is fixed now
The app gets broken after clicking to show a menu for a restaurant.