Skip to content

Commit

Permalink
flytt ut vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Anders Robbestad committed Dec 10, 2020
1 parent e340122 commit 005b2d6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ const server = {
cookieName: "klage-oppgave-frontend",
};

let downstream_api = envVar({
name: "DOWNSTREAM_API_URL",
required: false,
});
if (!downstream_api)
downstream_api = "https://klage-oppgave-api.intern.nav.no/";
if (server.cluster === "dev-gcp") {
downstream_api = "https://klage-oppgave-api.dev.nav.no/";
}

let api_client_id = envVar({
name: "DOWNSTREAM_API_CLIENT_ID_PROD",
required: false,
});
if (server.cluster === "dev-gcp") {
api_client_id = envVar({
name: "DOWNSTREAM_API_CLIENT_ID_DEV",
required: false,
});
}

let azureAd = {};

let host = "https://klage-oppgave.intern.nav.no";
Expand Down Expand Up @@ -119,27 +140,6 @@ const loadReverseProxyConfig = () => {
);
const scopes = envVar({ name: "DOWNSTREAM_API_SCOPES", required: false });

let downstream_api = envVar({
name: "DOWNSTREAM_API_URL",
required: false,
});
if (!downstream_api)
downstream_api = "https://klage-oppgave-api.intern.nav.no/";
if (server.cluster === "dev-gcp") {
downstream_api = "https://klage-oppgave-api.dev.nav.no/";
}

let api_client_id = envVar({
name: "DOWNSTREAM_API_CLIENT_ID_PROD",
required: false,
});
if (server.cluster === "dev-gcp") {
api_client_id = envVar({
name: "DOWNSTREAM_API_CLIENT_ID_DEV",
required: false,
});
}

config = {
apis: [
{
Expand Down

0 comments on commit 005b2d6

Please sign in to comment.