conf.sample.php 7.2 KB

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