Sign inSign up

ashwanthkumar/gcloud-proxy-cors

By ashwanthkumar

Updated about 6 years ago

Image
0

235

ashwanthkumar/gcloud-proxy-cors repository overview

gcloud-proxy-cors

Many (or Most) Google Cloud Services doesn't have the right CORS Headers to be able to work from Browsers. May be for good reason that their Javascript client libraries doesn't work within browsers. This docker image contains necessary nginx configurations to setup reverse proxy over the necessary Google Cloud APIs.

The following services have been configured

Usage

Create a folder to keep all the generated LetsEncrypt Certificates.

mkdir -p letsencrypt/

You would need to configure the environment variables

Environment VariableDescription
ORIGIN_CHECK_DOMAINFor security reasons, you need this variable to specify from which domain you would be making requests to these proxies. We don't return CORS Headers otherwise.
CERTBOT_EMAILEmail that would be associated with the certificates that are being generated.
CRM_FQDNFully-qualified domain name that you're exposing the CloudResourceManager API Proxy.
AL_FQDNFully-qualified domain name that you're exposing the AutoML API Proxy.
GS_FQDNFully-qualified domain name that you're exposing the Google Cloud Storage API Proxy.

You can then start the proxies using docker run.

docker pull ashwanthkumar/gcloud-proxy-cors:latest
docker run --restart=unless-stopped -v "$PWD/letsencrypt:/etc/letsencrypt" -e 'ORIGIN_CHECK_DOMAIN=airtableblocks\\.com' -e "[email protected]" -e "ENVSUBST_VARS=AL_FQDN GS_FQDN CRM_FQDN ORIGIN_CHECK_DOMAIN" -e "CRM_FQDN=cloudresourcemanager.foo.in" -e "AL_FQDN=automl.foo.in" -e "GS_FQDN=gs.foo.in" -p "80:80" -p "443:443" ashwanthkumar/gcloud-proxy-cors:latest

License

Public Domain

Tag summary

Content type

Image

Digest

Size

77.3 MB

Last updated

about 6 years ago

docker pull ashwanthkumar/gcloud-proxy-cors