CORS proxy with AWS Lambda.
Produces an "Access-Control-Allow-Origin"
header specific to your server with some basic configuration.
Simply configure allowed via the environment. '*' is used as a wildcard. Uses a comma separted list for multiple urls.
.tf_env_vars
{"ALLOW_ORIGINS": "https://*.library.nyu.edu,https://library.nyu.edu"}
For our purposes, the url is checked in to our repository; for those interested in forking, you can also refer to an environment variable which is referenced at the time of build and deploy.
CircleCI deployment is currently broken and has been disabled for the time being. See Update Lambda CORS Proxy for details.