Skip to content

orbiting/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet Another Proxy

A development tool to proxy a secure production API to localhost.

By default this rewrites all cookies to localhost, removes secure cookie flags and allows cors.

For example to make api.republik.ch available on localhost:5555 run:

npm i yaproxy -g
TARGET=https://api.republik.ch yaproxy

Specify one or more explicit allowed cors origins:

CORS_ORIGIN=http://localhost:3010,http://localhost:3003 TARGET=https://api.republik.ch yaproxy

Config

PORT=5555
# base url
TARGET
# true/false or comma-separated allowed cors origins
CORS_ORIGIN=true
# false or comma-separated source:target
COOKIE_DOMAIN_REWRITE=*:localhost
# true/false
COOKIE_STRIP_SECURE=true

Deploy

The repository contains a app.json manifesto and can easily be deployed. Don't be evil.

About

proxy a secure production API to localhost

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published