Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmdruid/cors-proxy
Launch your own CORS proxy service using Vercel and server-less functions. #featured #serverless
https://github.com/cmdruid/cors-proxy
Last synced: 7 days ago
JSON representation
Launch your own CORS proxy service using Vercel and server-less functions. #featured #serverless
- Host: GitHub
- URL: https://github.com/cmdruid/cors-proxy
- Owner: cmdruid
- License: mit
- Created: 2021-03-24T17:06:46.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T04:07:30.000Z (over 3 years ago)
- Last Synced: 2024-11-09T10:40:57.951Z (2 months ago)
- Language: JavaScript
- Homepage: cors-proxy-bice.vercel.app
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CORS Proxy Server
Lightweight, CORS-enabled server-less proxy for API requests.This server is designed to be very simple, light-weight and quick to deploy. "Set it and forget it!"
## How to use
To proxy an API request, simply place the URL of this server *before* the API URL that you wish to proxy, for example:
```
fetch(https://my-proxy-server.app/my-api-url.com?query=this&lookup=that)
```
This proxy server will parse out the trailing URL, including any queries, and then fetch the request for you. When it receives a response, the JSON will be forwarded back to you.If you have an 'authorization' bearer token set, the proxy server will forward that along as well.
Currently this proxy is only designed to forward 'GET' requests, but it can easy be expanded to forward other methods and headers as well.
## Dependencies
- [cors](https://github.com/expressjs/cors): Handles CORS policy on the headers.
- [express](https://github.com/expressjs/express): Handles the http requests.
- [node-fetch](https://github.com/node-fetch/node-fetch): Node.js implementation of fetch.## License
This repository is published under the [MIT licesne](LICENSE).