uncors

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 19 Imported by: 0

README

UNCORS logo

A simple dev HTTP/HTTPS proxy for replacing CORS headers.

Go version GitHub version License Coverage Go Report Card Reliability Rating Security Rating Lines of Code

Core features

Other new features you can find in roadmap.

Full documentation you can found on wiki pages.

Quick Install

Homebrew (macOS | Linux)

If you are on macOS or Linux and using Homebrew, you can install uncors with the following one-liner:

brew install evg4b/tap/uncors

Scoop (Windows)

If you are on Windows and using Scoop, you can install uncors with the following commands:

scoop bucket add evg4b https://github.com/evg4b/scoop-bucket.git
scoop install evg4b/uncors

NPM (Cross-platform)

To install uncors as a node package in your project, you can use the following commands:

Via npm:

npm install uncors --save-dev

Via yarn:

yarn add uncors --dev

Docker

We currently offer images for Docker

docker run -p 80:3000 evg4b/uncors --from 'http://local.github.com' --to 'https://github.com'

Stew (Cross-platform)

Also, you can install binaris using Stew with the following commands:

stew install evg4b/uncors

Binary (Cross-platform)

Download the appropriate version for your platform from UNCORS releases page. Once downloaded, the binary can be run from anywhere. You don’t need to install it into a global location. This works well for shared hosts and other systems where you don’t have a privileged account.

Ideally, you should install it somewhere in your PATH for easy use. /usr/local/bin is the most probable location.

Build from source

Prerequisite Tools

  • Git
  • Go (at least Go 1.11)

Fetch from GitHub

UNCORS uses the Go Modules support built into Go 1.11 to build. The easiest way to get started is to clone UNCORS source code in a directory outside the GOPATH, as in the following example:

mkdir $HOME/src
cd $HOME/src
git clone https://github.com/evg4b/uncors.git
cd uncors
go install -tags release

If you are a Windows user, substitute the $HOME environment variable above with %USERPROFILE%.

Usage

The following command can be used to start the UNCORS proxy server:

uncors --from 'http://localhost' --to 'https://github.com' --http-port 8080

More information about configuration and usage you can fiund on UNCORS wiki.

⚠️ Caution

Please note that removing or replacing CORS headers can pose potential security vulnerabilities. This tool is specifically designed to streamline the development and testing workflow and should not be used in a production environment or as a remote proxy server. It has not undergone a thorough security review, so caution should be exercised when utilizing it.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
log
ui
pkg
urlx
Package urlx parses and normalizes URLs.
Package urlx parses and normalizes URLs.
testing
testutils
nolint: gomnd
nolint: gomnd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL