localhost-cors-proxy

command module
v0.0.0-...-2e25ff8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

README

localhost-cors-proxy

A proxy that binds to 127.0.0.1:N and reverse proxies to forwardurl, adding a set of various CORS headers to enable CORS (and therefore the javascript fetch api in browser). I developed this to help with testing local react apps that use fetch to talk to APIs elsewhere.

Security notice

DO NOT RUN THIS ON ANY UNTRUSTED NETWORK, YOU FOOLS.

A Very Special Note When Using as a Passthrough in a node.js Process and Accessing via Chrome

HTTPS=true npm run start, Chrome now validates CORS out of process and only handles HTTPS now.

Using

  • go build proxy.go
  • ./proxy -listenport 8000 -forwardurl http://localhost:8888

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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