This is not an officially supported Google product.
See LICENSE for license information.
- Background
This repo holds example nginx javascript code to generate SignedCookie for use with GCP's CloudCDN.
- Usage
To use the container image generated by the Dockerfile, you need to create(and adjust) a secret with the following content:
#!/bin/bash
export SIGNKEY="the signing key"
export KEYNAME="keyname"
export DOMAIN="example.com"
export EXPIRES="1200"
export LOCATION_REGEXP=".*"
export BACKEND_SERVER="someipaddress:80"
When you run the container, pass the name of the secret to the container through an env named SECRETNAME. Remember to grant access to the secret to the VM(s) running the container.
Otherwise just use the js file and nginx config files in the nginx directory.