Awesome
hapi-rest-proxy
hapi-rest-proxy: a proxy server for making REST calls to server without cors headers
Getting started
Node
- Grap the latest release
- set your port via process.env.PORT (default: 8080)
- Start the proxy with
yarn start
ornpm start
- Make your REST calls over http://localhost:8080/?url=YOUR_URL
Docker
Use existing image
- Grap the latest one
docker pull chrishelgert/hapi-rest-proxy
- Start the container with
docker run -d -p 8080:8080 chrishelgert/hapi-rest-proxy
Build your image
- Grap the latest release
- Build the image with
npm run docker:build
yarn docker:build
- or
docker build -t hapi-rest-proxy .
- Start the container with
npm run docker:start
yarn docker:start
docker run -d -p 8080:8080 hapi-rest-proxy
- Make your REST calls over http://localhost:8080/?url=YOUR_URL
Example
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://localhost:8080/?url=https://api.github.com"
Contributing
- Fork it
- Create your feature branch
- Commit your changes
- Push to the branch
- Create new Pull Request
LICENSE
Copyright (c) 2017-present Chris Helgert. See License for details.