{"id":26826371,"url":"https://github.com/ivansojivarghese/proxy","last_synced_at":"2026-04-19T07:31:41.192Z","repository":{"id":284977051,"uuid":"956662344","full_name":"ivansojivarghese/proxy","owner":"ivansojivarghese","description":"A serverless function for proxying image requests, designed for use with Vercel. It fetches images from a specified URL and serves them with appropriate CORS headers and content types. Ideal for bypassing cross-origin restrictions when fetching remote images.","archived":false,"fork":false,"pushed_at":"2025-10-29T02:53:38.000Z","size":2490,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T04:27:03.301Z","etag":null,"topics":["api","cors","image-proxy","javascript","node-fetch","proxy","serverless","vercel"],"latest_commit_sha":null,"homepage":"https://proxy-five-puce.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivansojivarghese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-28T16:30:27.000Z","updated_at":"2025-10-29T02:53:42.000Z","dependencies_parsed_at":"2025-08-11T16:18:14.132Z","dependency_job_id":"b3d8b66a-0a1f-4794-aaf5-6bb98ae7a064","html_url":"https://github.com/ivansojivarghese/proxy","commit_stats":null,"previous_names":["ivansojivarghese/proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ivansojivarghese/proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansojivarghese%2Fproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansojivarghese%2Fproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansojivarghese%2Fproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansojivarghese%2Fproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivansojivarghese","download_url":"https://codeload.github.com/ivansojivarghese/proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansojivarghese%2Fproxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31998792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cors","image-proxy","javascript","node-fetch","proxy","serverless","vercel"],"created_at":"2025-03-30T11:19:08.182Z","updated_at":"2026-04-19T07:31:41.187Z","avatar_url":"https://github.com/ivansojivarghese.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Image Proxy Serverless Function\n\nThis project contains a serverless function to act as a proxy for fetching and serving images. It uses Vercel's serverless function capabilities and allows you to fetch images from any URL and serve them from a different domain while handling CORS.\n\n## Features\n\n- **Proxy for Image Fetching:** Fetches an image from a URL and serves it via a Vercel serverless function.\n- **CORS Support:** Allows cross-origin requests from a specified domain.\n- **Custom Content-Type:** The function automatically sets the appropriate content type for the image.\n\n## Setup\n\nTo get started with this serverless function, follow these steps:\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/ivansojivarghese/proxy.git\ncd proxy\n```\n\n### 2. Install Dependencies (Optional)\n\nIf you need to install dependencies (e.g., `node-fetch` for handling HTTP requests), you can create a `package.json` file in the repository:\n\n```bash\nnpm init -y\nnpm install node-fetch\n```\n\n### 3. Deploy on Vercel\n\n1. **Create a Vercel Account:** Go to [Vercel](https://vercel.com) and create an account if you don’t already have one.\n2. **Connect to GitHub:** After logging into Vercel, connect your GitHub account and import this repository.\n3. **Deploy the Function:** Vercel will automatically detect the serverless function in the `proxy.js` file and deploy it.\n4. **Configure Domain Access:** The CORS headers in the function allow requests only from `https://media-sphere.vercel.app`. You can adjust this domain as needed.\n\n### 4. Using the Proxy\n\nTo use the image proxy, make a `GET` request to your deployed Vercel function with the image URL as a query parameter:\n\n```\nhttps://\u003cyour-vercel-project\u003e.vercel.app/api/proxy?url=\u003cimage-url\u003e\n```\n\nReplace `\u003cyour-vercel-project\u003e` with the name of this Vercel project and `\u003cimage-url\u003e` with the URL of the image you want to fetch.\n\nFor example:\n\n```\nhttps://proxy-five-puce.vercel.app/api/proxy?url=https://example.com/image.jpg\n```\n\nThe function will fetch the image from the provided URL and return it to the requester.\n\n## License\n\nThis project is open-source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansojivarghese%2Fproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivansojivarghese%2Fproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansojivarghese%2Fproxy/lists"}