How to setup CORS properly in GO?

  cors, docker, go
ADDRESS=0.0.0.0
CACHE_SIZE_MB=32
CORS_ENABLED=true
CORS_ALLOWED_HEADERS=
CORS_ALLOWED_METHODS=
CORS_ALLOWED_ORIGINS=
CORS_ALLOW_CREDENTIALS=
CORS_DEBUG=true
HOST_ONLY_DOMAINS=*
HTTP_CLIENT_TIMEOUT=5s
HTTP_MAX_AGE_DURATION=720h
HTTP_USER_AGENT=''
POPULAR_SITES=bing.com,github.com,instagram.com,reddit.com
PORT=8080
SERVER_MODE=redirect

I have this docker_run file. From the go server how to properly set up this file please help.

I have an example.com where the server hosted and I am trying to use this API to my example1.com

Source: Docker Questions

LEAVE A COMMENT