fix: use env.json in both client and server (#42359)
This commit is contained in:
committed by
GitHub
parent
104cbc596e
commit
3875c6e619
@ -15,7 +15,7 @@ import _ from 'lodash';
|
|||||||
import generate from 'nanoid/generate';
|
import generate from 'nanoid/generate';
|
||||||
import badwordFilter from 'bad-words';
|
import badwordFilter from 'bad-words';
|
||||||
|
|
||||||
import { apiLocation } from '../../../../config/env';
|
import { apiLocation } from '../../../../config/env.json';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fixCompletedChallengeItem,
|
fixCompletedChallengeItem,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { homeLocation } from '../../../../config/env';
|
import { homeLocation } from '../../../../config/env.json';
|
||||||
import { allowedOrigins } from '../../../../config/cors-settings';
|
import { allowedOrigins } from '../../../../config/cors-settings';
|
||||||
|
|
||||||
export default function constantHeaders() {
|
export default function constantHeaders() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import helmet from 'helmet';
|
import helmet from 'helmet';
|
||||||
|
|
||||||
import { homeLocation } from '../../../../config/env';
|
import { homeLocation } from '../../../../config/env.json';
|
||||||
|
|
||||||
let trusted = [
|
let trusted = [
|
||||||
"'self'",
|
"'self'",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { mockReq as mockRequest, mockRes } from '../boot_tests/challenge.test';
|
import { mockReq as mockRequest, mockRes } from '../boot_tests/challenge.test';
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
import { homeLocation } from '../../../../config/env';
|
import { homeLocation } from '../../../../config/env.json';
|
||||||
import createRequestAuthorization, {
|
import createRequestAuthorization, {
|
||||||
isAllowedPath
|
isAllowedPath
|
||||||
} from './request-authorization';
|
} from './request-authorization';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { auth0 } from '../../../config/secrets';
|
import { auth0 } from '../../../config/secrets';
|
||||||
import { homeLocation, apiLocation } from '../../../config/env';
|
import { homeLocation, apiLocation } from '../../../config/env.json';
|
||||||
|
|
||||||
const { clientID, clientSecret, domain } = auth0;
|
const { clientID, clientSecret, domain } = auth0;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ const { availableLangs } = require('../../../../config/i18n/all-langs');
|
|||||||
const { allowedOrigins } = require('../../../../config/cors-settings');
|
const { allowedOrigins } = require('../../../../config/cors-settings');
|
||||||
// homeLocation is being used as a fallback here. If the one provided by the
|
// homeLocation is being used as a fallback here. If the one provided by the
|
||||||
// client is invalid we default to this.
|
// client is invalid we default to this.
|
||||||
const { homeLocation } = require('../../../../config/env');
|
const { homeLocation } = require('../../../../config/env.json');
|
||||||
|
|
||||||
function getReturnTo(encryptedParams, secret, _homeLocation = homeLocation) {
|
function getReturnTo(encryptedParams, secret, _homeLocation = homeLocation) {
|
||||||
let params;
|
let params;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const env = require('../config/env');
|
const env = require('../config/env.json');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
|
||||||
const { createFilePath } = require('gatsby-source-filesystem');
|
const { createFilePath } = require('gatsby-source-filesystem');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const env = require('../../../config/env');
|
const env = require('../../../config/read-env');
|
||||||
const { availableLangs } = require('../../../config/i18n/all-langs');
|
const { availableLangs } = require('../../../config/i18n/all-langs');
|
||||||
|
|
||||||
const globalConfigPath = path.resolve(__dirname, '../../../config');
|
const globalConfigPath = path.resolve(__dirname, '../../../config');
|
||||||
|
Reference in New Issue
Block a user