Comments (8)
Hi:
I made this repo when I was wrestling with getting a corsProxy working with Cloudflare functions. Since I didn't delete it when the approach in this repo failed, I will update it with the working code in an hour or so.
Rich
from cors-proxy2.
I think that I have cleaned up now. Please test my instructions and let me know by closing the issue if you could get it to work.
from cors-proxy2.
can i run this code use express JS ?
i'm confused about cloudflare pages
from cors-proxy2.
The response is handled a little differently in express. I added a method so that cors-proxy2 can run on express or on Cloudflare pages functions. Please let me know if I have answered your question.
from cors-proxy2.
Cannot GET /
did you have telegram or discord ?
from cors-proxy2.
http://127.0.0.1:8080/corsproxy/google.com
302 Moved
The document has moved here.
how to follow redirect and display the html page
from cors-proxy2.
Hi:
Looks like you have it working. I guess I could follow the redirect by looking at the status code and re-doing the fetch. I could use that behavior for downloading .zips from github in a progressive web app.
I refactored cors-proxy because I found the testing server supplied with isomorphic git unreliable. I wanted to use git from within a progressive web app and on stackblitz. I reasoned that if I exported it as a Cloudflare pages function I could use it as part of my larger project diy-pwa and it would stand up when sales engineers (my target market) start really using diy-pwa.
I didn't intend for it to be an open proxy, but I left out the code from cors-proxy that restricted it to git. My intention was to put the git code back in but I didn't think that anyone would be interested in cors-proxy2 by itself and there were more pressing details. I would be interested to know about your use case for cors-proxy2. In the meantime, I will transparently follow the redirect when fetching for the downloading a .zip from github case.
Thanks
Rich (rhildred#3087 on Discord)
from cors-proxy2.
I created the library to run cloudflare workers and pages functions on express. It is at https://github.com/diy-pwa/cloudflare2express. I didn't write any tests yet, but if you look at the example there are 3 desk check test endpoints. I didn't get following a redirect done. Out of time for today but I am planning on cleaning up sometime soon.
from cors-proxy2.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cors-proxy2.