Skip to content

Commit

Permalink
fix: code bug email alerts to go to security@ inbox
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Feb 28, 2025
1 parent 9e53a6d commit 3b411d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ PREVIEW_EMAIL=true
# HELPER_ENCRYPTION_KEY=xxxxx
# SRS_SECRET=xxxxx
EMAIL_ABUSE="abuse@{{WEB_HOST}}"
EMAIL_SECURITY="security@{{WEB_HOST}}"
EMAIL_FRIENDLY_FROM="no-reply@{{WEB_HOST}}"
EMAIL_DEFAULT_FROM_EMAIL="support@{{WEB_HOST}}"
EMAIL_DEFAULT_FROM="{{APP_NAME}} <{{EMAIL_DEFAULT_FROM_EMAIL}}>"
Expand Down
1 change: 1 addition & 0 deletions .env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ SEND_EMAIL=
PREVIEW_EMAIL=
TRANSPORT_DEBUG=
EMAIL_ABUSE=
EMAIL_SECURITY=
EMAIL_FRIENDLY_FROM=
EMAIL_DEFAULT_FROM_EMAIL=
EMAIL_DEFAULT_FROM=
Expand Down
2 changes: 1 addition & 1 deletion app/models/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ Logs.post('save', async (doc, next) => {
await emailHelper({
template: 'alert',
message: {
to: config.email.message.from,
to: config.securityEmail,
subject: `Code Bug: ${doc?.err?.name} - ${doc?.err?.message} (${doc.id})`
},
locals: {
Expand Down
1 change: 1 addition & 0 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ const config = {
supportRequestMaxLength: env.SUPPORT_REQUEST_MAX_LENGTH,
abuseEmail: env.EMAIL_ABUSE,
friendlyFromEmail: env.EMAIL_FRIENDLY_FROM,
securityEmail: env.EMAIL_SECURITY,
email: {
preview: {
open: env.PREVIEW_EMAIL,
Expand Down

0 comments on commit 3b411d4

Please sign in to comment.