fix: use env.json in both client and server (#42359)

This commit is contained in:
Oliver Eyton-Williams
2021-06-08 14:12:44 +02:00
committed by GitHub
parent 104cbc596e
commit 3875c6e619
9 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@ import _ from 'lodash';
import generate from 'nanoid/generate';
import badwordFilter from 'bad-words';
import { apiLocation } from '../../../../config/env';
import { apiLocation } from '../../../../config/env.json';
import {
fixCompletedChallengeItem,

View File

@ -1,4 +1,4 @@
import { homeLocation } from '../../../../config/env';
import { homeLocation } from '../../../../config/env.json';
import { allowedOrigins } from '../../../../config/cors-settings';
export default function constantHeaders() {

View File

@ -1,6 +1,6 @@
import helmet from 'helmet';
import { homeLocation } from '../../../../config/env';
import { homeLocation } from '../../../../config/env.json';
let trusted = [
"'self'",

View File

@ -2,7 +2,7 @@
import { mockReq as mockRequest, mockRes } from '../boot_tests/challenge.test';
import jwt from 'jsonwebtoken';
import { homeLocation } from '../../../../config/env';
import { homeLocation } from '../../../../config/env.json';
import createRequestAuthorization, {
isAllowedPath
} from './request-authorization';

View File

@ -1,5 +1,5 @@
import { auth0 } from '../../../config/secrets';
import { homeLocation, apiLocation } from '../../../config/env';
import { homeLocation, apiLocation } from '../../../config/env.json';
const { clientID, clientSecret, domain } = auth0;

View File

@ -3,7 +3,7 @@ const { availableLangs } = require('../../../../config/i18n/all-langs');
const { allowedOrigins } = require('../../../../config/cors-settings');
// homeLocation is being used as a fallback here. If the one provided by the
// client is invalid we default to this.
const { homeLocation } = require('../../../../config/env');
const { homeLocation } = require('../../../../config/env.json');
function getReturnTo(encryptedParams, secret, _homeLocation = homeLocation) {
let params;

View File

@ -1,4 +1,4 @@
const env = require('../config/env');
const env = require('../config/env.json');
const webpack = require('webpack');
const { createFilePath } = require('gatsby-source-filesystem');

View File

@ -1,7 +1,7 @@
const fs = require('fs');
const path = require('path');
const env = require('../../../config/env');
const env = require('../../../config/read-env');
const { availableLangs } = require('../../../config/i18n/all-langs');
const globalConfigPath = path.resolve(__dirname, '../../../config');