config.default.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?php
  2. # Do not modify this file, which defines default values,
  3. # but instead edit `./data/config.php` after the install process is completed,
  4. # or edit `./data/config.custom.php` before the install process.
  5. return [
  6. # Set to `development` to get additional error messages,
  7. # or to `production` to get only the most important messages.
  8. 'environment' => 'production',
  9. # Minimum severity of the messages written to `./data/users/*/log.txt`, overriding the
  10. # verbosity implied by `environment` above. One of `error`, `warning`, `notice`, `info`, `debug`,
  11. # from the least to the most verbose. Leave empty (`''`) to keep the default behaviour:
  12. # `warning` (i.e. only errors and warnings) when `environment` is `production`, `debug` otherwise.
  13. 'log_level' => '',
  14. # Used to make crypto more unique. Generated during install.
  15. 'salt' => '',
  16. # Specify address of the FreshRSS instance,
  17. # used when building absolute URLs, e.g. for WebSub.
  18. # Examples:
  19. # https://example.net/FreshRSS/p/
  20. # https://freshrss.example.net/
  21. 'base_url' => '',
  22. # Specify address of the FreshRSS auto-update server.
  23. 'auto_update_url' => 'https://update.freshrss.org',
  24. # Natural language of the user interface, e.g. `en`, `fr`.
  25. 'language' => 'en',
  26. # Title of this FreshRSS instance in the Web user interface.
  27. 'title' => 'FreshRSS',
  28. # Meta description used when `allow_robots` is true.
  29. 'meta_description' => '',
  30. # Override logo of this FreshRSS instance in the Web user interface.
  31. # It is rendered inside an <a>...</a> element and must be valid HTML or text.
  32. # Example: '<img class="logo" src="https://example.net/Hello.png" alt="Logo Example" /> Hello'
  33. 'logo_html' => '',
  34. # Name of the default user. Also used as the public user for anonymous reading.
  35. 'default_user' => '_',
  36. # Force users to validate their email address. If `true`, an email with a
  37. # validation URL is sent during registration, and users cannot access their
  38. # feed if they didn’t access this URL.
  39. 'force_email_validation' => false,
  40. # Allow or not visitors without login to see the articles
  41. # of the default user.
  42. 'allow_anonymous' => false,
  43. # Allow or not anonymous users to start the refresh process.
  44. 'allow_anonymous_refresh' => false,
  45. # Login method:
  46. # `none` is without password and shows only the default user;
  47. # `form` is a conventional Web login form;
  48. # `http_auth` is an access controlled by the HTTP Web server (e.g. `/FreshRSS/p/i/.htaccess` for Apache)
  49. # if you use `http_auth`, remember to protect only `/FreshRSS/p/i/`,
  50. # and in particular not protect `/FreshRSS/p/api/` if you would like to use the API (different login system).
  51. 'auth_type' => 'form',
  52. # Whether reauthentication is required for performing sensitive actions e.g. promoting a user or applying an update
  53. 'reauth_required' => true,
  54. # Time before asking for reauth
  55. # Default: 1200s (20 min)
  56. 'reauth_time' => 1200,
  57. # When using http_auth, automatically register any unknown user
  58. 'http_auth_auto_register' => true,
  59. # Optionally, you can specify the $_SERVER key containing the email address used when registering
  60. # the user (e.g. REMOTE_USER_EMAIL).
  61. 'http_auth_auto_register_email_field' => '',
  62. # Allow or not the use of the API, used for mobile apps.
  63. # End-point is https://freshrss.example.net/api/greader.php
  64. # You need to set the user’s API password.
  65. 'api_enabled' => false,
  66. # By default, FreshRSS will display a warning to logged-in admin users if the CSP policy is insecure.
  67. # This setting can disable the warning.
  68. # For more information see: https://freshrss.github.io/FreshRSS/en/admins/10_ServerConfig.html#security
  69. 'suppress_csp_warning' => false,
  70. # Content-Security-Policy frame-ancestors
  71. 'csp.frame-ancestors' => "'none'",
  72. # Enable or not the use of syslog to log the activity of
  73. # SimplePie, which is retrieving RSS feeds via HTTP requests.
  74. 'simplepie_syslog_enabled' => true,
  75. # Enable or not support of PubSubHubbub.
  76. # /!\ It should NOT be enabled if base_url is not reachable by an external server.
  77. 'pubsubhubbub_enabled' => false,
  78. # Allow or not Web robots (e.g. search engines) in HTML headers.
  79. 'allow_robots' => false,
  80. # If true does nothing, if false restricts HTTP Referer via: meta referrer origin
  81. 'allow_referrer' => false,
  82. # Number of feeds to refresh in parallel from the Web user interface.
  83. # Faster with higher values. Reduce for server with little memory or database issues.
  84. 'nb_parallel_refresh' => 10,
  85. 'limits' => [
  86. # Duration in seconds of the login cookie.
  87. 'cookie_duration' => FreshRSS_Auth::DEFAULT_COOKIE_DURATION,
  88. # Duration in seconds of the SimplePie cache, during which a query to the RSS feed will return the local cached version.
  89. # Especially important for multi-user setups.
  90. # Might be overridden by HTTP response headers.
  91. 'cache_duration' => 800,
  92. # Minimal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`.
  93. 'cache_duration_min' => 60,
  94. # Maximal cache duration (in seconds), overriding HTTP response headers `Cache-Control` and `Expires`.
  95. 'cache_duration_max' => 86400,
  96. # Default rate limit duration (in seconds), when HTTP response header `Retry-After` is absent.
  97. 'retry_after_default' => 1500,
  98. # Maximal rate limit duration (in seconds), overriding HTTP response header `Retry-After`.
  99. 'retry_after_max' => 172800,
  100. # SimplePie HTTP request timeout in seconds.
  101. 'timeout' => 20,
  102. # If a user has not used FreshRSS for more than x seconds,
  103. # then its feeds are not refreshed anymore.
  104. 'max_inactivity' => PHP_INT_MAX,
  105. # Max number of feeds for a user.
  106. 'max_feeds' => 131072,
  107. # Max number of categories for a user.
  108. 'max_categories' => 16384,
  109. # Max number of accounts that anonymous users can create (only for Web form login type)
  110. # 0 for an unlimited number of accounts
  111. # 1 is to not allow user registrations (1 is corresponding to the admin account)
  112. 'max_registrations' => 1,
  113. # Max amount of bytes that are allowed for upload of custom favicon
  114. 'max_favicon_upload_size' => 1048576, # 1 MiB
  115. # Limits for regex, useful to limit regex during user searches
  116. 'regex_backtrack_limit' => 10000,
  117. 'regex_recursion_limit' => 100,
  118. ],
  119. # Options used by cURL when making HTTP requests, e.g. when the SimplePie library retrieves feeds.
  120. # https://www.php.net/function.curl-setopt
  121. 'curl_options' => [
  122. # Options to disable SSL/TLS certificate check (e.g. for self-signed HTTPS)
  123. //CURLOPT_SSL_VERIFYHOST => 0,
  124. //CURLOPT_SSL_VERIFYPEER => false,
  125. # Options to use a proxy for retrieving feeds.
  126. //CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
  127. //CURLOPT_PROXY => '127.0.0.1',
  128. //CURLOPT_PROXYPORT => 8080,
  129. //CURLOPT_PROXYAUTH => CURLAUTH_BASIC,
  130. //CURLOPT_PROXYUSERPWD => 'user:password',
  131. ],
  132. 'db' => [
  133. # Type of database: `sqlite` or `mysql` or 'pgsql'
  134. 'type' => 'sqlite',
  135. # Database server
  136. 'host' => 'localhost',
  137. # Database user
  138. 'user' => '',
  139. # Database password
  140. 'password' => '',
  141. # Database name
  142. 'base' => '',
  143. # Tables prefix (useful if you use the same database for multiple things)
  144. 'prefix' => 'freshrss_',
  145. # Additional connection string parameters, such as PostgreSQL 'sslmode=??;sslrootcert=??'
  146. # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  147. 'connection_uri_params' => '',
  148. # Additional PDO parameters, such as offered by MySQL https://www.php.net/ref.pdo-mysql
  149. 'pdo_options' => [
  150. //Pdo\Mysql::ATTR_SSL_KEY => '/path/to/client-key.pem',
  151. //Pdo\Mysql::ATTR_SSL_CERT => '/path/to/client-cert.pem',
  152. //Pdo\Mysql::ATTR_SSL_CA => '/path/to/ca-cert.pem',
  153. ],
  154. ],
  155. # Configuration to send emails.
  156. # These options are basically a mapping of the PHPMailer class attributes
  157. # from the PHPMailer library.
  158. #
  159. # See https://phpmailer.github.io/PHPMailer/classes/PHPMailer-PHPMailer-PHPMailer.html#properties
  160. 'mailer' => 'mail', // 'mail' or 'smtp'
  161. 'smtp' => [
  162. 'hostname' => '', // the domain used in the Message-ID header
  163. 'host' => 'localhost', // the SMTP server address
  164. 'port' => 25,
  165. 'auth' => false,
  166. 'auth_type' => '', // 'CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2' or ''
  167. 'username' => '',
  168. 'password' => '',
  169. 'secure' => '', // '', 'ssl' or 'tls'
  170. 'auto_tls' => true, // maps to PHPMailer’s `SMTPAutoTLS`; set to false to disable opportunistic STARTTLS, e.g. when using a self-signed certificate
  171. 'from' => 'root@localhost',
  172. ],
  173. # Automatic SQLite export of each user’s database, triggered by `./cli/export-sqlite-auto.php`.
  174. # Intended to be scheduled by an admin (e.g. via cron) for periodic on-server backups
  175. # distinct from the manual `./cli/db-backup.php` / `./cli/db-restore.php` migration workflow.
  176. 'auto_sqlite_export' => [
  177. # Enable the automatic export. When false, `./cli/export-sqlite-auto.php` exits without writing.
  178. 'enabled' => false,
  179. # Number of past exports to retain per user. Older files are pruned after a successful export.
  180. 'retention' => 7,
  181. ],
  182. # List of enabled FreshRSS extensions.
  183. 'extensions_enabled' => [
  184. ],
  185. # Extensions configurations
  186. 'extensions' => [],
  187. # Disable self-update,
  188. 'disable_update' => false,
  189. # Trusted IPs (e.g. of last proxy) that are allowed to send unsafe HTTP headers.
  190. # The connection IP used during FreshRSS setup is automatically added to this list.
  191. # Will be checked against CONN_REMOTE_ADDR (if available, to be robust even when using Apache mod_remoteip)
  192. # or REMOTE_ADDR environment variable.
  193. # This array can be overridden by the TRUSTED_PROXY environment variable.
  194. # Read the documentation before configuring this https://freshrss.github.io/FreshRSS/en/admins/09_AccessControl.html
  195. 'trusted_sources' => [
  196. '127.0.0.0/8',
  197. '::1/128',
  198. ],
  199. # Requests to internal hosts such as 127.0.0.1 are blocked by default
  200. # Blocked ranges include:
  201. # - 10.0.0.0/8
  202. # - 172.16.0.0/12
  203. # - 192.168.0.0/16
  204. #
  205. # Here you can add overrides for particular IP/domain:port combinations
  206. # Examples: 127.0.0.1:8080, rss-bridge:80, etc.
  207. #
  208. # CIDR is permitted too
  209. # Examples: 0.0.0.0/0, ::/0 (to allow any IPv4 or any IPv6)
  210. #
  211. # Setting * disables this check completely, allowing any host to be accessed (unsafe)
  212. 'internal_host_allowlist' => [],
  213. ];