مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
feat: new configuration system (and schema) (#2819)
هذا الالتزام موجود في:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
if Postal.config.rails&.secret_key
|
||||
Rails.application.secrets.secret_key_base = Postal.config.rails.secret_key
|
||||
if Postal::Config.rails.secret_key
|
||||
Rails.application.secrets.secret_key_base = Postal::Config.rails.secret_key
|
||||
else
|
||||
warn "No secret key was specified in the Postal config file. Using one for just this session"
|
||||
Rails.application.secrets.secret_key_base = SecureRandom.hex(128)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
require "postal/config"
|
||||
|
||||
if Postal.config.general&.exception_url
|
||||
if Postal::Config.logging.sentry_dsn
|
||||
Sentry.init do |config|
|
||||
config.dsn = Postal.config.general.exception_url
|
||||
config.dsn = Postal::Config.logging.sentry_dsn
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
require "postal/config"
|
||||
|
||||
if Postal.config&.smtp
|
||||
# TODO: by default, we should just send mail through the local Postal
|
||||
# installation rather than having to actually configure an SMTP server.
|
||||
ActionMailer::Base.delivery_method = :smtp
|
||||
ActionMailer::Base.smtp_settings = { address: Postal.config.smtp.host, user_name: Postal.config.smtp.username, password: Postal.config.smtp.password, port: Postal.config.smtp.port || 25 }
|
||||
end
|
||||
ActionMailer::Base.delivery_method = :smtp
|
||||
ActionMailer::Base.smtp_settings = {
|
||||
address: Postal::Config.smtp.host,
|
||||
user_name: Postal::Config.smtp.username,
|
||||
password: Postal::Config.smtp.password,
|
||||
port: Postal::Config.smtp.port
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم