CORS Proxy Server is a simple and efficient proxy server built with Node.js and Express.js to fetch headers and HTML content from any URL, bypassing CORS restrictions. It comes with a user-friendly front-end interface. Live Demo
- Handles CORS (Cross-Origin Resource Sharing) requests
- Fetch headers and HTML content from any URL
- Simple UI built with Tailwind CSS
- Deployable on Vercel, Render, and other platforms
- Improved error handling and redirection support
/cors-proxy-server
│-- public/
│ └── index.html # Frontend UI
│-- server.js # Node.js backend server
│-- package.json # Dependencies and scripts
│-- vercel.json # Vercel deployment configuration
│-- README.md # Documentation
│-- LICENSE # License
- Node.js (v16 or higher)
- Yarn or NPM
git clone https://github.com/AsifKamboh-COM/cors-proxy-server.git
cd cors-proxy-server
Using Yarn:
yarn install
Using NPM:
npm install
yarn start
or
npm start
Once the server is running, you can use the proxy by making a request to:
http://localhost:3000/proxy?url=<TARGET_URL>
Example:
http://localhost:3000/proxy?url=https://example.com
This will return:
- Response status (e.g., HTTP/2 200 OK)
- Response headers (all headers from the target URL)
- Full HTML content of the requested page
To deploy this CORS Proxy Server on Vercel, follow these steps:
-
Fork or clone the repository.
-
Install Vercel CLI if not already installed:
npm install -g vercel
-
Login to Vercel:
vercel login
-
Navigate to the project directory and deploy:
vercel
Follow the instructions to complete the deployment.
- Push your code to GitHub
- Create a new Web Service on Render
- Connect your GitHub repository
- Set the build command:
yarn install
- Set the start command:
yarn start
- Deploy and get your Render URL!
You can configure the following environment variables:
PORT
(default:3000
)
If you get the error:
{
"status": "Failed to fetch URL",
"error": "Invalid URL"
}
- Make sure the target URL is publicly accessible.
- If the request is blocked due to CORS, try using different headers.
- Some sites have anti-bot protections, which may cause failures.
This project is licensed under the MIT License.
Asif Kamboh – Developer & Open-Source Contributor