mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Updated WEBHOOK_SECRET check to output a warning
refs https://github.com/TryGhost/Team/issues/841 When using our development tooling Ghost should always start, instead of exiting with an error. This check for the WEBHOOK_SECRET env var was the primary cause of Ghost erroring in development, so it's been switched with a warning.
This commit is contained in:
parent
65111c9464
commit
caf01544c8
@ -68,7 +68,8 @@ const membersService = {
|
|||||||
|
|
||||||
if (env !== 'production') {
|
if (env !== 'production') {
|
||||||
if (!process.env.WEBHOOK_SECRET && membersConfig.isStripeConnected()) {
|
if (!process.env.WEBHOOK_SECRET && membersConfig.isStripeConnected()) {
|
||||||
throw new Error('Cannot use remote webhooks in development. Please restart in production mode or see https://ghost.org/docs/webhooks/#stripe-webhooks for developing with Stripe.');
|
process.env.WEBHOOK_SECRET = 'DEFAULT_WEBHOOK_SECRET';
|
||||||
|
logging.warn('Cannot use remote webhooks in development. See https://ghost.org/docs/webhooks/#stripe-webhooks for developing with Stripe.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paymentConfig && paymentConfig.secretKey.startsWith('sk_live')) {
|
if (paymentConfig && paymentConfig.secretKey.startsWith('sk_live')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user