diff --git a/build/entrypoint.d/20-osim-runtime-json.sh b/build/entrypoint.d/20-osim-runtime-json.sh index 574984b8d..d527f1768 100755 --- a/build/entrypoint.d/20-osim-runtime-json.sh +++ b/build/entrypoint.d/20-osim-runtime-json.sh @@ -13,6 +13,7 @@ OSIM_BACKENDS_OSIDB_AUTH="${OSIM_BACKENDS_OSIDB_AUTH:-kerberos}" OSIM_BACKENDS_BUGZILLA="${OSIM_BACKENDS_BUGZILLA:-http://bugzilla-service:8001}" OSIM_BACKENDS_JIRA="${OSIM_BACKENDS_JIRA:-http://jira-service:8002}" OSIM_BACKENDS_ERRATA="${OSIM_BACKENDS_ERRATA:-http://errata-service:8003}" +OSIM_BACKENDS_MITRE="${OSIM_BACKENDS_MITRE:-http://mitre-service:8003}" OSIM_BACKENDS_JIRA_DISPLAY="${OSIM_BACKENDS_JIRA_DISPLAY:-http://jira-service:8002}" OSIM_VERSION='{"rev":"dev","tag":"dev","timestamp":"1970-01-01T00:00:00Z"}' OSIM_READONLY_MODE=${OSIM_READONLY_MODE:-false} @@ -33,7 +34,8 @@ IFS= read -r -d '' OSIM_RUNTIME </etc/nginx/conf.d/resolvers.conf + +# Add MITRE reverse proxy endpoint +cat </tmp/osim-nginx-proxy.conf +location /proxy/mitre/ { + # Trailing slash in proxy_pass strips the location directive prefix from the downstream URL + proxy_pass ${OSIM_NGINX_PROXY_MITRE}/; + proxy_http_version 1.1; +} +EOF diff --git a/src/stores/__tests__/osimRuntime.spec.ts b/src/stores/__tests__/osimRuntime.spec.ts index 43ba3f044..b666632ee 100644 --- a/src/stores/__tests__/osimRuntime.spec.ts +++ b/src/stores/__tests__/osimRuntime.spec.ts @@ -15,6 +15,7 @@ describe('osimRuntime', () => { bugzilla: 'bugzilla', jira: 'jira', errata: 'errata', + mitre: 'mitre', jiraDisplay: 'jiraDisplay', osidbAuth: 'credentials', }, diff --git a/src/stores/osimRuntime.ts b/src/stores/osimRuntime.ts index 6a8e095d5..603fd2670 100644 --- a/src/stores/osimRuntime.ts +++ b/src/stores/osimRuntime.ts @@ -32,6 +32,7 @@ const OsimRuntime = z.object({ jira: z.string(), errata: z.string(), jiraDisplay: z.string(), + mitre: z.string(), }), osimVersion: z.object({ rev: z.string(), @@ -52,6 +53,7 @@ const runtime = ref({ jira: 'http://jira-service:8002', errata: 'http://errata-service:8003', jiraDisplay: 'http://jira-service:8002', + mitre: 'http://mitre-service:8004', }, osimVersion: { rev: 'dev', tag: 'dev', timestamp: '1970-01-01T00:00:00Z' }, error: 'error',