noms-digital-studio/elite2-proxy-util

Name: elite2-proxy-util

Owner: NOMS Digital Studio

Description: Proxy that adds the gateway token for easier dev use

Created: 2017-10-24 08:24:30.0

Updated: 2017-10-24 08:52:23.0

Pushed: 2017-10-24 08:52:22.0

Homepage: null

Size: 10

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

elite2-proxy-util

Proxy that adds the gateway token for easier dev use.

Add the following environment variables, optionally in .env:

Calls to

http://localhost:3002/elite/some/real/path

will have the gateway token header added and be proxied to

https://realserver/some/real/path

Target host can be set in config.js.

Port can be set via environment variables.

Path re-write rules can be sett in the proxy options in app.js.

eg

POST http://localhost:3002/elite/elite2api/users/login with header Content-type=application/json wih body {“username”:“use yours”,“password”:“use yours”}

then for subsequent requests use

header {“elite-authorization”:“Bearer token.from.login”}


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.