From 13480ee6e75e91283ecb09b4d7610d2e16d5615c Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Tue, 15 Oct 2024 09:55:29 +0000 Subject: [PATCH] Fix dev:oidc npm script * generate public/client-config.js at foreman startup * remove nginx's special handling for client-config.js Closes #1034 --- .gitignore | 1 + Procfile | 4 ++-- main.nginx.conf | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 45ccb754a..f0d6a2cfe 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ npm-debug.log* !/.nginx/.gitkeep /.eslintcache +/public/client-config.json diff --git a/Procfile b/Procfile index eedf78b04..2cb29b307 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -vue: vue-cli-service build --mode development --watch -nginx: nginx -c "$PWD/main.nginx.conf" -p "$PWD" -e stderr +vue: echo "{\"oidcEnabled\":${VUE_APP_OIDC_ENABLED-false}}" >./public/client-config.json && vue-cli-service build --mode development --watch +nginx: docker run --rm --network=host -v $PWD/nginx-conf:/etc/nginx/:ro -v $PWD/dist:/odk-central-frontend/dist nginx diff --git a/main.nginx.conf b/main.nginx.conf index 077723efa..d8350b239 100644 --- a/main.nginx.conf +++ b/main.nginx.conf @@ -94,11 +94,6 @@ http { proxy_set_header X-Forwarded-Proto https; } - location = /client-config.json { - include ./common-headers.nginx.conf; - return 200 "{}"; - } - location / { root ./dist;