1- # Global Application Defaults
1+ # Global Application Configuration
22
3- # This is initially for internal settings. If all goes well using
4- # this new config gem, then we'll migrate entirely to the new Settings
5- # format for private instances too.
3+ # See also https://github.com/pglombardo/PasswordPusher/blob/master/Configuration.md
4+ # for a further explanation of the larger settings available here.
65
76# Logins are disabled by default since they require an MTA (email) server
87# available to send emails through.
8+ #
99# For instructions on how to enable logins, see this page:
1010# https://github.com/pglombardo/PasswordPusher/discussions/276
11+ #
12+ # Environment variable override:
13+ # PWP__ENABLE_LOGINS='false'
14+ #
1115enable_logins : false
1216
1317# By default, Password Pusher can be used by anonymous users to push
@@ -24,10 +28,18 @@ allow_anonymous: true
2428
2529# The domain (without protocol) where this instance is hosted
2630# Used in generating fully qualified URLs.
31+ #
32+ # Environment variable override:
33+ # PWP__HOST_DOMAIN='pwpush.com'
34+ #
2735# host_domain: 'pwpush.com'
2836
2937# The protocol to reach the domain above
3038# Used in generating fully qualified URLs.
39+ #
40+ # Environment variable override:
41+ # PWP__HOST_PROTOCOL='https'
42+ #
3143host_protocol : ' https'
3244
3345# Set the following value to force the base URL of generated links.
@@ -42,23 +54,96 @@ host_protocol: 'https'
4254#
4355# override_base_url: 'https://pwpush.mydomain.com'
4456
57+
58+ # Configure the application throttling limits.
59+ #
60+ # Throttling enforces a minimum time interval
61+ # between subsequent HTTP requests from a particular client, as
62+ # well as by defining a maximum number of allowed HTTP requests
63+ # per a given time period (per minute, hourly, or daily).
64+ #
65+ # See https://github.com/dryruby/rack-throttle#throttling-strategies
66+ # for a description of function.
67+ #
68+ throttling :
69+ # ..maximum number of allowed HTTP requests per day
70+ #
71+ # Default: 1000
72+ #
73+ # Environment Variable Override: PWP__THROTTLING__DAILY='1000'
74+ daily : 1000
75+
76+ # ..maximum number of allowed HTTP requests per hour
77+ #
78+ # Default: 100
79+ #
80+ # Environment Variable Override: PWP__THROTTLING__HOURLY='100'
81+ hourly : 100
82+
83+ # ..maximum number of allowed HTTP requests per minute
84+ #
85+ # Default: 30
86+ #
87+ # Environment Variable Override: PWP__THROTTLING__MINUTE='30'
88+ minute : 30
89+
90+ # ..maximum number of allowed HTTP requests per second
91+ #
92+ # Default: 2
93+ #
94+ # Environment Variable Override: PWP__THROTTLING__SECOND='2'
95+ second : 2
96+
97+
4598# When logins are enabled, an SMTP server is required to send emails to users
4699# for things such as forgot password, unlock account, confirm account etc.
47100# If `enable_logins` is set to true above, the following _are required_ to be
48101# filled out with valid values.
49102mail :
103+ # Email delivery errors will be shown in the application
104+ # Environment Variable Override: PWP__MAIL__RAISE_DELIVERY_ERRORS='false'
50105 raise_delivery_errors : false
106+
107+ # Allows you to use a remote mail server. Just change it from its default "localhost" setting.
108+ # Environment Variable Override: PWP__MAIL__SMTP_ADDRESS='smtp.example.com'
51109 # smtp_address: smtp.example.com
110+
111+ # If your mail server requires authentication, set the username in this setting.
112+ # Environment Variable Override: PWP__MAIL__SMTP_USER_NAME='apikey'
52113 # smtp_user_name: 'apikey'
114+
115+ # If your mail server requires authentication, set the password in this setting.
116+ # Environment Variable Override: PWP__MAIL__SMTP_PASSWORD='something@&#$'
53117 # smtp_password: ''
118+
119+ # Port of the SMTP server
120+ # Environment Variable Override: PWP__MAIL__SMTP_PORT='587'
54121 smtp_port : 587
122+
123+ # If your mail server requires authentication, you need to specify the
124+ # authentication type here. This is a string and one of :plain (will send
125+ # the password in the clear), :login (will send password Base64 encoded)
126+ # or :cram_md5 (combines a Challenge/Response mechanism to exchange
127+ # information and a cryptographic Message Digest 5 algorithm to hash
128+ # important information)
129+ # Environment Variable Override: PWP__MAIL__SMTP_AUTHENTICATION='plain'
55130 smtp_authentication : ' plain'
131+
132+ # Use STARTTLS when connecting to your SMTP server and fail if unsupported.
133+ # Environment Variable Override: PWP__MAIL__SMTP_STARTTLS='true'
56134 smtp_starttls : true
135+
136+ # Number of seconds to wait while attempting to open a connection.
137+ # Environment Variable Override: PWP__MAIL__SMTP_OPEN_TIMEOUT='10'
57138 smtp_open_timeout : 10
139+
140+ # Number of seconds to wait until timing-out a read(2) call.
141+ # Environment Variable Override: PWP__MAIL__SMTP_READ_TIMEOUT='10'
58142 smtp_read_timeout : 10
59143
60144 # Configure the e-mail address which will be shown as 'From' in emails
61145 # See config/initializers/devise.rb where this is used
146+ # Environment Variable Override: PWP__MAIL__MAILER_SENDER='"Password Pusher" <[email protected] >' 62147 # mailer_sender: '"Password Pusher" <[email protected] >' 63148
64149# List of supported languages indexed by language code. This is used
@@ -85,7 +170,9 @@ language_codes:
85170
86171# The default language for the application. This must be one of the
87172# valid/supported language codes from the list above.
173+ #
88174# Example: default_locale: :es
175+ #
89176# Environment Variable Override: PWP__DEFAULT_LOCALE='es'
90177default_locale : :en
91178
0 commit comments