Skip to content

A simple and lightweight CORS proxy server that allows you to make cross-origin API requests safely from your frontend applications.

License

Notifications You must be signed in to change notification settings

metatony/cors-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CORS Proxy

A simple and lightweight CORS proxy server that allows you to make cross-origin API requests safely from your frontend applications. This is especially useful when working with third-party APIs that don’t include the proper CORS headers.

Browsers enforce the Same-Origin Policy, which blocks frontend applications from making requests to APIs on different domains without the correct CORS headers.
This proxy acts as a middleware server — it forwards requests to the target API and returns the response with the appropriate CORS headers, allowing your frontend app to access the data safely.

Use Cases

  • Accessing external APIs in development
  • Testing APIs without CORS restrictions
  • Preventing frontend code from exposing sensitive API keys

Setup

Clone the repository

git clone https://github.com/metatony/cors-proxy.git
cd cors-proxy

Install dependencies

npm install

Deploy on Render

  • Push your project to GitHub
  • Go to Render.com
  • Create a free account and click new Web Service
  • Connect your GitHub repo
  • Click deploy web service
  • When it finishes deploying, Render gives you a public URL like:
  https://your-cors-anywhere.onrender.com
  • You can now make requests like:
https://your-cors-anywhere.onrender.com/https://Api_Link&apikey=YOUR_API_KEY

Alternative Platforms

You can also deploy to:

  • Railway.app
  • Vercel
  • Glitch

All support Node.js apps with minimal setup.

About

A simple and lightweight CORS proxy server that allows you to make cross-origin API requests safely from your frontend applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published