-
Notifications
You must be signed in to change notification settings - Fork 2
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
Example CORS Proxy #3
Comments
Can you show me how you set up the proxy? |
I'm currently hosting a CORS proxy on my own machine using Cors-Anywhere. My config.js file for tfnsw-pid is:
Here's the code for the CORS proxy for your reference (
Lmao I had a feeling it had something to do with the proxy. I geniunely had no idea how to use a CORS proxy as I've never used or hosted one before and I also didn't really know what to put in the config file lmaoooo. Thanks so much for your help! |
Your server example should work just fine so I'm not sure. Try adding some logging to the listen function in the server to see what's being passed through and tweak from there I guess. Sorry I can't help further. |
That's Okay. I'll probably hold it off for now. If you don't mind me asking, when you originally created the program, what CORS proxy did you use? |
I wrote my own. Should do the same thing, just takes the URL and spits outs the contents in the response. |
Did you get it working? |
The CORS proxy was because it makes the requests to another web service from the browser, which is heavily restricted by CORS as I don't own the service that I'm using (despite having permission to use it). I have plans to rewrite this app as a Next.js web app which can make use of React Server Components so a CORS proxy may no longer be necessary in the future. No ETA however. |
@msoffice95 nah never did unfortunately. I ultimately gave up cause I couldn't fix the problem at all HAHAHA But yeah @kurisubrooks that sounds good!!! Can't wait for it! |
I am not sure if this helps, but fyi I helped my mate out with getting this up and running. There were two things that I had to tweak in your setup:
|
Hi there (again lmao),
I've managed to get the program running but upon opening
localhost:3000
, it is returning an error:Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'departures')
.The text was updated successfully, but these errors were encountered: