config.default.php 8.9 KB

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