conf.sample.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. ;<?php http_response_code(403); /*
  2. ; config file for PrivateBin
  3. ;
  4. ; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.
  5. [main]
  6. ; (optional) set a project name to be displayed on the website
  7. ; name = "PrivateBin"
  8. ; enable or disable the discussion feature, defaults to true
  9. discussion = true
  10. ; preselect the discussion feature, defaults to false
  11. opendiscussion = false
  12. ; enable or disable the password feature, defaults to true
  13. password = true
  14. ; enable or disable the file upload feature, defaults to false
  15. fileupload = false
  16. ; preselect the burn-after-reading feature, defaults to false
  17. burnafterreadingselected = false
  18. ; which display mode to preselect by default, defaults to "plaintext"
  19. ; make sure the value exists in [formatter_options]
  20. defaultformatter = "plaintext"
  21. ; (optional) set a syntax highlighting theme, as found in css/prettify/
  22. ; syntaxhighlightingtheme = "sons-of-obsidian"
  23. ; size limit per paste or comment in bytes, defaults to 10 Mebibytes
  24. sizelimit = 10485760
  25. ; template to include, default is "bootstrap" (tpl/bootstrap.php)
  26. template = "bootstrap"
  27. ; (optional) notice to display
  28. ; notice = "Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service."
  29. ; by default PrivateBin will guess the visitors language based on the browsers
  30. ; settings. Optionally you can enable the language selection menu, which uses
  31. ; a session cookie to store the choice until the browser is closed.
  32. languageselection = false
  33. ; set the language your installs defaults to, defaults to English
  34. ; if this is set and language selection is disabled, this will be the only language
  35. ; languagedefault = "en"
  36. ; (optional) URL shortener address to offer after a new paste is created
  37. ; it is suggested to only use this with self-hosted shorteners as this will leak
  38. ; the pastes encryption key
  39. ; urlshortener = "https://shortener.example.com/api?link="
  40. ; (optional) Let users create a QR code for sharing the paste URL with one click.
  41. ; It works both when a new paste is created and when you view a paste.
  42. ; qrcode = true
  43. ; (optional) IP based icons are a weak mechanism to detect if a comment was from
  44. ; a different user when the same username was used in a comment. It might be
  45. ; used to get the IP of a non anonymous comment poster if the server salt is
  46. ; leaked and a SHA256 HMAC rainbow table is generated for all (relevant) IPs.
  47. ; Can be set to one these values: "none" / "vizhash" / "identicon" (default).
  48. ; icon = "none"
  49. ; Content Security Policy headers allow a website to restrict what sources are
  50. ; allowed to be accessed in its context. You need to change this if you added
  51. ; custom scripts from third-party domains to your templates, e.g. tracking
  52. ; scripts or run your site behind certain DDoS-protection services.
  53. ; Check the documentation at https://content-security-policy.com/
  54. ; Notes:
  55. ; - If you use a bootstrap theme, you can remove the allow-popups from the
  56. ; sandbox restrictions.
  57. ; - By default this disallows to load images from third-party servers, e.g. when
  58. ; they are embedded in pastes. If you wish to allow that, you can adjust the
  59. ; policy here. See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-not-it-load-embedded-images
  60. ; for details.
  61. ; - The 'unsafe-eval' is used in two cases; to check if the browser supports
  62. ; async functions and display an error if not and for Chrome to enable
  63. ; webassembly support (used for zlib compression). You can remove it if Chrome
  64. ; doesn't need to be supported and old browsers don't need to be warned.
  65. ; cspheader = "default-src 'none'; manifest-src 'self'; connect-src * blob:; script-src 'self' 'unsafe-eval'; style-src 'self'; font-src 'self'; img-src 'self' data: blob:; media-src blob:; object-src blob:; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals"
  66. ; stay compatible with PrivateBin Alpha 0.19, less secure
  67. ; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
  68. ; sha256 in HMAC for the deletion token
  69. ; zerobincompatibility = false
  70. ; Enable or disable the warning message when the site is served over an insecure
  71. ; connection (insecure HTTP instead of HTTPS), defaults to true.
  72. ; Secure transport methods like Tor and I2P domains are automatically whitelisted.
  73. ; It is **strongly discouraged** to disable this.
  74. ; See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-it-show-me-an-error-about-an-insecure-connection for more information.
  75. ; httpwarning = true
  76. ; Pick compression algorithm or disable it. Only applies to pastes/comments
  77. ; created after changing the setting.
  78. ; Can be set to one these values: "none" / "zlib" (default).
  79. ; compression = "zlib"
  80. [expire]
  81. ; expire value that is selected per default
  82. ; make sure the value exists in [expire_options]
  83. default = "1week"
  84. [expire_options]
  85. ; Set each one of these to the number of seconds in the expiration period,
  86. ; or 0 if it should never expire
  87. 5min = 300
  88. 10min = 600
  89. 1hour = 3600
  90. 1day = 86400
  91. 1week = 604800
  92. ; Well this is not *exactly* one month, it's 30 days:
  93. 1month = 2592000
  94. 1year = 31536000
  95. never = 0
  96. [formatter_options]
  97. ; Set available formatters, their order and their labels
  98. plaintext = "Plain Text"
  99. syntaxhighlighting = "Source Code"
  100. markdown = "Markdown"
  101. [traffic]
  102. ; time limit between calls from the same IP address in seconds
  103. ; Set this to 0 to disable rate limiting.
  104. limit = 10
  105. ; (optional) if you only want some source IP addresses to create pastes
  106. ; enter their IPv4 address(es) here, separated by commas. This does not
  107. ; currently support CIDR notation, only individual IPv4 addresses.
  108. ; whitelist_paste_creation = "12.34.56.78,99.88.77.66"
  109. ; (optional) if your website runs behind a reverse proxy or load balancer,
  110. ; set the HTTP header containing the visitors IP address, i.e. X_FORWARDED_FOR
  111. ; header = "X_FORWARDED_FOR"
  112. ; directory to store the traffic limits in
  113. dir = PATH "data"
  114. [purge]
  115. ; minimum time limit between two purgings of expired pastes, it is only
  116. ; triggered when pastes are created
  117. ; Set this to 0 to run a purge every time a paste is created.
  118. limit = 300
  119. ; maximum amount of expired pastes to delete in one purge
  120. ; Set this to 0 to disable purging. Set it higher, if you are running a large
  121. ; site
  122. batchsize = 10
  123. ; directory to store the purge limit in
  124. dir = PATH "data"
  125. [model]
  126. ; name of data model class to load and directory for storage
  127. ; the default model "Filesystem" stores everything in the filesystem
  128. class = Filesystem
  129. [model_options]
  130. dir = PATH "data"
  131. ;[model]
  132. ; example of DB configuration for MySQL
  133. ;class = Database
  134. ;[model_options]
  135. ;dsn = "mysql:host=localhost;dbname=privatebin;charset=UTF8"
  136. ;tbl = "privatebin_" ; table prefix
  137. ;usr = "privatebin"
  138. ;pwd = "Z3r0P4ss"
  139. ;opt[12] = true ; PDO::ATTR_PERSISTENT
  140. ;[model]
  141. ; example of DB configuration for SQLite
  142. ;class = Database
  143. ;[model_options]
  144. ;dsn = "sqlite:" PATH "data/db.sq3"
  145. ;usr = null
  146. ;pwd = null
  147. ;opt[12] = true ; PDO::ATTR_PERSISTENT