Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const webpackConfig = {

module.exports = Object.assign(
{
applicationServerPublicKey:
process.env.APPLICATION_SERVER_PUBLIC_KEY ||
'BHkStXEZjGMSdCHolgJAdmREB75lfi42OLNyRt4NRkLu_FEJYR-7Jv8hho1TSuYxTw2GqpYc3tLrotc55DfaNx0',
cookieSecret: process.env.COOKIE_SECRET || 'twreporter-cookie-secret',
host: process.env.HOST || 'localhost',
nodeEnv,
Expand Down
4 changes: 1 addition & 3 deletions src/components/web-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const _ = {

const formURL = twreporterRedux.utils.formURL

// TODO move applicationServerPublicKey to config
const applicationServerPublicKey =
'BHkStXEZjGMSdCHolgJAdmREB75lfi42OLNyRt4NRkLu_FEJYR-7Jv8hho1TSuYxTw2GqpYc3tLrotc55DfaNx0'
const applicationServerPublicKey = process.env.APPLICATION_SERVER_PUBLIC_KEY

/**
* The application server's public key is base 64 URL safe encoded.
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ const webpackConfig = {
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(config.nodeEnv),
'process.env.RELEASE_BRANCH': JSON.stringify(config.releaseBranch),
'process.env.APPLICATION_SERVER_PUBLIC_KEY': JSON.stringify(
config.applicationServerPublicKey
),
}),

// This plugin will cause hashes to be based on the relative path of the module,
Expand Down