Files
atst/deploy/azure/atst-envvars-configmap.yml
dandds 08fc530223 Add config value for CDN origin.
This value is set as the Access-Control-Allow-Origin header value for
the application. When using Azure CDN, the CDN will consume this header
when it populates its cache and use it on subsequent requests.

It would be possible to make this the same as the Flask SERVER_NAME
value. We explicitly set SERVER_NAME for Celery worker processes because
they need that information to contruct URLs outside of the request cycle
(Flask can infer the server name within a request cycle). I decided not
to rely on SERVER_NAME though because it has side effects:

- It determines what `url_for` uses as the host domain (which would be
  fine).
- It makes it so that the Flask app can only server requests to that
  domain (probably fine, but it felt like too big a side effect).

Additionally, SERVER_NAME does not include the scheme. For all of these
reasons I opted to make CDN_ORIGIN a separate config value.
2019-11-21 16:43:22 -05:00

20 lines
519 B
YAML

---
apiVersion: v1
kind: ConfigMap
metadata:
name: atst-envvars
namespace: atat
data:
ASSETS_URL: https://atat-cdn.azureedge.net/
CELERY_DEFAULT_QUEUE: celery-master
CDN_ORIGIN: https://azure.atat.code.mil
CSP: azure
FLASK_ENV: dev
LOG_JSON: "true"
OVERRIDE_CONFIG_FULLPATH: /opt/atat/atst/atst-overrides.ini
PGSSLMODE: verify-full
PGSSLROOTCERT: /opt/atat/atst/ssl/pgsslrootcert.crt
STATIC_URL: https://atat-cdn.azureedge.net/static/
TZ: UTC
UWSGI_CONFIG_FULLPATH: /opt/atat/atst/uwsgi.ini