Giter Site home page Giter Site logo

cors-proxy's Introduction

CORS proxy

Simple AWS Lambda based proxy server for making CORS requests from browser to any HTTP server.

Run locally

1. Install

npm install

2. Run

node_modules/.bin/serverless offline

3. Use

Open your browser and go to http://localhost:3000/?url=<origin page>. For example:

http://localhost:3000/?url=https://github.com/

Run on AWS

0. Requirements

You need AWS account first. Also you need your IAM user has access to deploy AWS lambdas.

1. Install

npm install

2. Deploy

node_modules/.bin/serverless config credentials --provider aws --key <aws_key> --secret <aws_secret>
node_modules/.bin/serverless deploy --region <aws_region>

You will see such console response:

Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (16.08 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............................
Serverless: Stack update finished...
Service Information
service: cors-proxy
stage: dev
region: eu-central-1
stack: cors-proxy-dev
api keys:
  None
endpoints:
  GET - https://qwertyuiop.execute-api.eu-central-1.amazonaws.com/dev/
functions:
  lambda: cors-proxy-dev-lambda

3. Use

Open your browser and use endpoint field from previous console response as base address. For example:

https://qwertyuiop.execute-api.eu-central-1.amazonaws.com/dev/?url=https://github.com/

cors-proxy's People

Contributors

antoniopresto avatar glifery avatar theseraya avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.