mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Add support for EMAIL_SMTP_PASS_FILE
Small feature to provide the email password from a file rather than directly from the env variable OVERLEAF_EMAIL_SMTP_PASS. Useful when used in conjunction with Docker Compose secrets.
This commit is contained in:
@@ -383,7 +383,16 @@ if (process.env.OVERLEAF_EMAIL_FROM_ADDRESS != null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
process.env.OVERLEAF_EMAIL_SMTP_USER != null ||
|
process.env.OVERLEAF_EMAIL_SMTP_USER != null &&
|
||||||
|
process.env.OVERLEAF_EMAIL_SMTP_PASS_FILE != null
|
||||||
|
) {
|
||||||
|
settings.email.parameters.auth = {
|
||||||
|
user: process.env.OVERLEAF_EMAIL_SMTP_USER,
|
||||||
|
pass: require("fs").readFileSync(process.env.OVERLEAF_EMAIL_SMTP_PASS_FILE, "utf8")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (
|
||||||
|
process.env.OVERLEAF_EMAIL_SMTP_USER != null &&
|
||||||
process.env.OVERLEAF_EMAIL_SMTP_PASS != null
|
process.env.OVERLEAF_EMAIL_SMTP_PASS != null
|
||||||
) {
|
) {
|
||||||
settings.email.parameters.auth = {
|
settings.email.parameters.auth = {
|
||||||
|
|||||||
Reference in New Issue
Block a user