Simple AWS Lambda based proxy server for making CORS requests from browser to any HTTP server.
npm install
node_modules/.bin/serverless offline
Open your browser and go to http://localhost:3000/?url=<origin page>
. For example:
http://localhost:3000/?url=https://github.com/
You need AWS account first. Also you need your IAM user has access to deploy AWS lambdas.
npm install
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
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/