Discover Packages
github.com/kaishuu0123/cors-reverse-proxy
command
module
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Jul 19, 2020
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
CORS Reverse Proxy
Simple reverse proxy for CORS issue.
... has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Use Case
Local development
When you want to trust the resources of a other container
ex. minio, draw.io, piwigo etc ...
Usage
docker pull kaishuu0123/cors-reverse-proxy
docker run -it -d \
-e CORS_REVERSE_PROXY_TARGET_URL=http://example.com \
-e CORS_REVERSE_PROXY_HOST=0.0.0.0 \
-p 8181:8081 \
--name cors-reverse-proxy \
kaishuu0123/cors-reverse-proxy
or
go build
./cors-reverse-proxy \
--target-url http://example.com/ \
--host 0.0.0.0
--port 8888
Command Line Options & Environment Variables
CLI Option(Long)
Shorthand
Environment Variables
Example
Default
--target-url
-t
CORS_REVERSE_PROXY_TARGET_URL
http://example.com/
--host
-h
CORS_REVERSE_PROXY_HOST
0.0.0.0
localhost
--port
-p
CORS_REVERSE_PROXY_PORT
8888
8081
--origin
-o
CORS_REVERSE_PROXY_ORIGIN
http://example.com/
*
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.