@kie-tools/cors-proxy
TypeScript icon, indicating that this package has built-in type declarations

0.32.0 • Public • Published

cors-proxy

This package contains a cors-proxy, which is a simple Node.js application intended to be used to solve CORS issues while connecting our front end tools (online-editor, serverless-logic-web-tools) with external services (GitHub, Bitbucket, OpenShift, Kubernetes...)

Build

$ pnpm @kie-tools/cors-proxy... build:prod

Configuration

The cors-proxy can be configured via environment variables:

  • CORS_PROXY_ORIGIN: Sets the value of the 'Access-Control-Allow-Origin' header, defaults to *
  • CORS_PROXY_VERBOSE: Allows the proxy to run in verbose mode... useful to trace requests on development environments. Defaults to false

For example:

$ export CORS_PROXY_ORIGIN=*
$ export CORS_PROXY_VERBOSE=false

Running cors-proxy

After building the package and setting up the environment variables, in the package folder run the following command:

$ node ./dist/index.js

Running cors-proxy in dev mode.

$ pnpm @kie-tools/cors-proxy start

You can also use the following envs to configure cors-proxy when starting in dev-mode:

$ export CORS_PROXY__origin=*
$ export CORS_PROXY__verbose=false

Default values can be found here.

Readme

Keywords

none

Package Sidebar

Install

npm i @kie-tools/cors-proxy

Weekly Downloads

1

Version

0.32.0

License

Apache-2.0

Unpacked Size

719 kB

Total Files

18

Last publish

Collaborators

  • kie-tools-bot