settings.defaults.coffee 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. Path = require('path')
  2. http = require('http')
  3. http.globalAgent.maxSockets = 300
  4. # Make time interval config easier.
  5. seconds = 1000
  6. minutes = 60 * seconds
  7. # These credentials are used for authenticating api requests
  8. # between services that may need to go over public channels
  9. httpAuthUser = process.env['WEB_API_USER']
  10. httpAuthPass = process.env['WEB_API_PASSWORD']
  11. httpAuthUsers = {}
  12. if httpAuthUser and httpAuthPass
  13. httpAuthUsers[httpAuthUser] = httpAuthPass
  14. sessionSecret = process.env['SESSION_SECRET'] or "secret-please-change"
  15. if process.env['V1_API_URL'] or process.env['V1_HOST']
  16. v1Api =
  17. url: process.env['V1_API_URL'] or "http://#{process.env['V1_HOST']}:5000"
  18. user: process.env['V1_API_USER']
  19. pass: process.env['V1_API_PASSWORD']
  20. else
  21. v1Api =
  22. url: undefined
  23. user: undefined
  24. pass: undefined
  25. intFromEnv = (name, defaultValue) ->
  26. if defaultValue in [null, undefined] or typeof defaultValue != 'number'
  27. throw new Error("Bad default integer value for setting: #{name}, #{defaultValue}")
  28. parseInt(process.env[name], 10) || defaultValue
  29. module.exports = settings =
  30. allowAnonymousReadAndWriteSharing:
  31. process.env['SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING'] == 'true'
  32. # Databases
  33. # ---------
  34. mongo:
  35. url : process.env['MONGO_CONNECTION_STRING'] || process.env['MONGO_URL'] || "mongodb://#{process.env['MONGO_HOST'] or '127.0.0.1'}/sharelatex"
  36. poolSize: parseInt(process.env['MONGO_POOL_SIZE'], 10) || 10
  37. redis:
  38. web:
  39. host: process.env['REDIS_HOST'] || "localhost"
  40. port: process.env['REDIS_PORT'] || "6379"
  41. password: process.env["REDIS_PASSWORD"] or ""
  42. maxRetriesPerRequest: parseInt(process.env["REDIS_MAX_RETRIES_PER_REQUEST"] || '20')
  43. # websessions:
  44. # cluster: [
  45. # {host: 'localhost', port: 7000}
  46. # {host: 'localhost', port: 7001}
  47. # {host: 'localhost', port: 7002}
  48. # {host: 'localhost', port: 7003}
  49. # {host: 'localhost', port: 7004}
  50. # {host: 'localhost', port: 7005}
  51. # ]
  52. # ratelimiter:
  53. # cluster: [
  54. # {host: 'localhost', port: 7000}
  55. # {host: 'localhost', port: 7001}
  56. # {host: 'localhost', port: 7002}
  57. # {host: 'localhost', port: 7003}
  58. # {host: 'localhost', port: 7004}
  59. # {host: 'localhost', port: 7005}
  60. # ]
  61. # cooldown:
  62. # cluster: [
  63. # {host: 'localhost', port: 7000}
  64. # {host: 'localhost', port: 7001}
  65. # {host: 'localhost', port: 7002}
  66. # {host: 'localhost', port: 7003}
  67. # {host: 'localhost', port: 7004}
  68. # {host: 'localhost', port: 7005}
  69. # ]
  70. api:
  71. host: process.env['REDIS_HOST'] || "localhost"
  72. port: process.env['REDIS_PORT'] || "6379"
  73. password: process.env["REDIS_PASSWORD"] or ""
  74. maxRetriesPerRequest: parseInt(process.env["REDIS_MAX_RETRIES_PER_REQUEST"] || '20')
  75. # Service locations
  76. # -----------------
  77. # Configure which ports to run each service on. Generally you
  78. # can leave these as they are unless you have some other services
  79. # running which conflict, or want to run the web process on port 80.
  80. internal:
  81. web:
  82. port: webPort = process.env['WEB_PORT'] or 3000
  83. host: process.env['LISTEN_ADDRESS'] or 'localhost'
  84. documentupdater:
  85. port: docUpdaterPort = 3003
  86. gitBridgePublicBaseUrl: "http://#{process.env['GIT_BRIDGE_HOST'] || 'localhost'}:8000"
  87. # Tell each service where to find the other services. If everything
  88. # is running locally then this is easy, but they exist as separate config
  89. # options incase you want to run some services on remote hosts.
  90. apis:
  91. web:
  92. url: "http://#{process.env['WEB_API_HOST'] or process.env['WEB_HOST'] or "localhost"}:#{process.env['WEB_API_PORT'] or process.env['WEB_PORT'] or 3000}"
  93. user: httpAuthUser
  94. pass: httpAuthPass
  95. documentupdater:
  96. url : "http://#{process.env['DOCUPDATER_HOST'] or process.env['DOCUMENT_UPDATER_HOST'] or 'localhost'}:#{docUpdaterPort}"
  97. thirdPartyDataStore:
  98. url : "http://#{process.env['TPDS_HOST'] or 'localhost'}:3002"
  99. emptyProjectFlushDelayMiliseconds: 5 * seconds
  100. dropboxApp: process.env['TPDS_DROPBOX_APP']
  101. tags:
  102. url :"http://#{process.env['TAGS_HOST'] or 'localhost'}:3012"
  103. spelling:
  104. url : "http://#{process.env['SPELLING_HOST'] or 'localhost'}:3005"
  105. host: process.env['SPELLING_HOST']
  106. trackchanges:
  107. url : "http://#{process.env['TRACK_CHANGES_HOST'] or 'localhost'}:3015"
  108. project_history:
  109. sendProjectStructureOps: process.env.PROJECT_HISTORY_ENABLED == 'true' or false
  110. initializeHistoryForNewProjects: process.env.PROJECT_HISTORY_ENABLED == 'true' or false
  111. displayHistoryForNewProjects: process.env.PROJECT_HISTORY_ENABLED == 'true' or false
  112. url : "http://#{process.env['PROJECT_HISTORY_HOST'] or 'localhost'}:3054"
  113. docstore:
  114. url : "http://#{process.env['DOCSTORE_HOST'] or 'localhost'}:3016"
  115. pubUrl: "http://#{process.env['DOCSTORE_HOST'] or 'localhost'}:3016"
  116. chat:
  117. url: "http://#{process.env['CHAT_HOST'] or 'localhost'}:3010"
  118. internal_url: "http://#{process.env['CHAT_HOST'] or 'localhost'}:3010"
  119. blog:
  120. url: "http://localhost:3008"
  121. port: 3008
  122. university:
  123. url: "http://localhost:3011"
  124. filestore:
  125. url: "http://#{process.env['FILESTORE_HOST'] or 'localhost'}:3009"
  126. clsi:
  127. url: "http://#{process.env['CLSI_HOST'] or 'localhost'}:3013"
  128. # url: "http://#{process.env['CLSI_LB_HOST']}:3014"
  129. backendGroupName: undefined
  130. templates:
  131. url: "http://#{process.env['TEMPLATES_HOST'] or 'localhost'}:3007"
  132. githubSync:
  133. url: "http://#{process.env['GITHUB_SYNC_HOST'] or 'localhost'}:3022"
  134. recurly:
  135. apiKey: process.env['RECURLY_API_KEY'] or ''
  136. apiVersion: process.env['RECURLY_API_VERSION']
  137. subdomain: process.env['RECURLY_SUBDOMAIN'] or ''
  138. publicKey: process.env['RECURLY_PUBLIC_KEY'] or ''
  139. geoIpLookup:
  140. url: "http://#{process.env['GEOIP_HOST'] or process.env['FREEGEOIP_HOST'] or 'localhost'}:8080/json/"
  141. realTime:
  142. url: "http://#{process.env['REALTIME_HOST'] or 'localhost'}:3026"
  143. contacts:
  144. url: "http://#{process.env['CONTACTS_HOST'] or 'localhost'}:3036"
  145. sixpack:
  146. url: ""
  147. references:
  148. url: if process.env['REFERENCES_HOST']? then "http://#{process.env['REFERENCES_HOST']}:3040" else undefined
  149. notifications:
  150. url: "http://#{process.env['NOTIFICATIONS_HOST'] or 'localhost'}:3042"
  151. analytics:
  152. url: "http://#{process.env['ANALYTICS_HOST'] or 'localhost'}:3050"
  153. linkedUrlProxy:
  154. url: process.env['LINKED_URL_PROXY']
  155. thirdpartyreferences:
  156. url: "http://#{process.env['THIRD_PARTY_REFERENCES_HOST'] or 'localhost'}:3046"
  157. v1:
  158. url: v1Api.url
  159. user: v1Api.user
  160. pass: v1Api.pass
  161. v1_history:
  162. url: "http://#{process.env['V1_HISTORY_HOST'] or "localhost"}:3100/api"
  163. user: process.env['V1_HISTORY_USER'] or 'staging'
  164. pass: process.env['V1_HISTORY_PASSWORD'] or 'password'
  165. templates:
  166. user_id: process.env.TEMPLATES_USER_ID or "5395eb7aad1f29a88756c7f2"
  167. showSocialButtons: false
  168. showComments: false
  169. # cdn:
  170. # web:
  171. # host:"http://nowhere.sharelatex.dev"
  172. # darkHost:"http://cdn.sharelatex.dev:3000"
  173. # Where your instance of ShareLaTeX can be found publically. Used in emails
  174. # that are sent out, generated links, etc.
  175. siteUrl : siteUrl = process.env['PUBLIC_URL'] or 'http://localhost:3000'
  176. lockManager:
  177. lockTestInterval: intFromEnv('LOCK_MANAGER_LOCK_TEST_INTERVAL', 50)
  178. maxTestInterval: intFromEnv('LOCK_MANAGER_MAX_TEST_INTERVAL', 1000)
  179. maxLockWaitTime: intFromEnv('LOCK_MANAGER_MAX_LOCK_WAIT_TIME', 10000)
  180. redisLockExpiry: intFromEnv('LOCK_MANAGER_REDIS_LOCK_EXPIRY', 30)
  181. slowExecutionThreshold: intFromEnv('LOCK_MANAGER_SLOW_EXECUTION_THRESHOLD', 5000)
  182. # Used to close the editor off to users
  183. editorIsOpen: process.env['EDITOR_IS_OPEN'] or true
  184. # Optional separate location for websocket connections, if unset defaults to siteUrl.
  185. wsUrl: process.env['WEBSOCKET_URL']
  186. wsUrlV2: process.env['WEBSOCKET_URL_V2']
  187. wsUrlBeta: process.env['WEBSOCKET_URL_BETA']
  188. wsUrlV2Percentage: parseInt(process.env['WEBSOCKET_URL_V2_PERCENTAGE'] || '0', 10)
  189. # cookie domain
  190. # use full domain for cookies to only be accessible from that domain,
  191. # replace subdomain with dot to have them accessible on all subdomains
  192. cookieDomain: process.env['COOKIE_DOMAIN']
  193. cookieName: process.env['COOKIE_NAME'] or "sharelatex.sid"
  194. # this is only used if cookies are used for clsi backend
  195. #clsiCookieKey: "clsiserver"
  196. # Same, but with http auth credentials.
  197. httpAuthSiteUrl: "http://#{httpAuthUser}:#{httpAuthPass}@#{siteUrl}"
  198. robotsNoindex: (process.env['ROBOTS_NOINDEX'] == "true") or false
  199. maxEntitiesPerProject: 2000
  200. maxUploadSize: 50 * 1024 * 1024 # 50 MB
  201. # Security
  202. # --------
  203. security:
  204. sessionSecret: sessionSecret
  205. bcryptRounds: (parseInt(process.env['BCRYPT_ROUNDS'], 10) || 12) # number of rounds used to hash user passwords (raised to power 2)
  206. httpAuthUsers: httpAuthUsers
  207. twoFactorAuthentication:
  208. enabled: false
  209. requiredForStaff: false
  210. # Default features
  211. # ----------------
  212. #
  213. # You can select the features that are enabled by default for new
  214. # new users.
  215. defaultFeatures: defaultFeatures =
  216. collaborators: -1
  217. dropbox: true
  218. github: true
  219. gitBridge: true
  220. versioning: true
  221. compileTimeout: 180
  222. compileGroup: "standard"
  223. references: true
  224. templates: true
  225. trackChanges: true
  226. features:
  227. personal: defaultFeatures
  228. plans: plans = [{
  229. planCode: "personal"
  230. name: "Personal"
  231. price: 0
  232. features: defaultFeatures
  233. }]
  234. enableSubscriptions:false
  235. enabledLinkedFileTypes: (process.env['ENABLED_LINKED_FILE_TYPES'] or '').split(',')
  236. # i18n
  237. # ------
  238. #
  239. i18n:
  240. subdomainLang:
  241. www: {lngCode:"en", url: siteUrl}
  242. defaultLng: "en"
  243. # Spelling languages
  244. # ------------------
  245. #
  246. # You must have the corresponding aspell package installed to
  247. # be able to use a language.
  248. languages: [
  249. {code: "en", name: "English"},
  250. {code: "en_US", name: "English (American)"},
  251. {code: "en_GB", name: "English (British)"},
  252. {code: "en_CA", name: "English (Canadian)"},
  253. {code: "af", name: "Afrikaans"},
  254. {code: "ar", name: "Arabic"},
  255. {code: "gl", name: "Galician"},
  256. {code: "eu", name: "Basque"},
  257. {code: "br", name: "Breton"},
  258. {code: "bg", name: "Bulgarian"},
  259. {code: "ca", name: "Catalan"},
  260. {code: "hr", name: "Croatian"},
  261. {code: "cs", name: "Czech"},
  262. {code: "da", name: "Danish"},
  263. {code: "nl", name: "Dutch"},
  264. {code: "eo", name: "Esperanto"},
  265. {code: "et", name: "Estonian"},
  266. {code: "fo", name: "Faroese"},
  267. {code: "fr", name: "French"},
  268. {code: "de", name: "German"},
  269. {code: "el", name: "Greek"},
  270. {code: "id", name: "Indonesian"},
  271. {code: "ga", name: "Irish"},
  272. {code: "it", name: "Italian"},
  273. {code: "kk", name: "Kazakh"},
  274. {code: "ku", name: "Kurdish"},
  275. {code: "lv", name: "Latvian"},
  276. {code: "lt", name: "Lithuanian"},
  277. {code: "nr", name: "Ndebele"},
  278. {code: "ns", name: "Northern Sotho"},
  279. {code: "no", name: "Norwegian"},
  280. {code: "fa", name: "Persian"},
  281. {code: "pl", name: "Polish"},
  282. {code: "pt_BR", name: "Portuguese (Brazilian)"},
  283. {code: "pt_PT", name: "Portuguese (European)"},
  284. {code: "pa", name: "Punjabi"},
  285. {code: "ro", name: "Romanian"},
  286. {code: "ru", name: "Russian"},
  287. {code: "sk", name: "Slovak"},
  288. {code: "sl", name: "Slovenian"},
  289. {code: "st", name: "Southern Sotho"},
  290. {code: "es", name: "Spanish"},
  291. {code: "sv", name: "Swedish"},
  292. {code: "tl", name: "Tagalog"},
  293. {code: "ts", name: "Tsonga"},
  294. {code: "tn", name: "Tswana"},
  295. {code: "hsb", name: "Upper Sorbian"},
  296. {code: "cy", name: "Welsh"},
  297. {code: "xh", name: "Xhosa"}
  298. ]
  299. # Password Settings
  300. # -----------
  301. # These restrict the passwords users can use when registering
  302. # opts are from http://antelle.github.io/passfield
  303. # passwordStrengthOptions:
  304. # pattern: "aA$3"
  305. # length:
  306. # min: 6
  307. # max: 128
  308. # Email support
  309. # -------------
  310. #
  311. # ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
  312. # To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
  313. #email:
  314. # fromAddress: ""
  315. # replyTo: ""
  316. # lifecycle: false
  317. ## Example transport and parameter settings for Amazon SES
  318. # transport: "SES"
  319. # parameters:
  320. # AWSAccessKeyID: ""
  321. # AWSSecretKey: ""
  322. # Third party services
  323. # --------------------
  324. #
  325. # ShareLaTeX's regular newsletter is managed by mailchimp. Add your
  326. # credentials here to integrate with this.
  327. # mailchimp:
  328. # api_key: ""
  329. # list_id: ""
  330. #
  331. # Fill in your unique token from various analytics services to enable
  332. # them.
  333. # analytics:
  334. # ga:
  335. # token: ""
  336. # gaOptimize:
  337. # id: ""
  338. # ShareLaTeX's help desk is provided by tenderapp.com
  339. # tenderUrl: ""
  340. #
  341. # Client-side error logging is provided by getsentry.com
  342. # sentry:
  343. # src: ""
  344. # publicDSN: ""
  345. #
  346. # src should be either a remote url like
  347. # //cdn.ravenjs.com/1.1.22/jquery,native/raven.min.js
  348. # or a local file in the js/libs directory.
  349. # The publicDSN is the token for the client-side getSentry service.
  350. # Production Settings
  351. # -------------------
  352. # Should javascript assets be served minified or not. Note that you will
  353. # need to run `grunt compile:minify` within the web-sharelatex directory
  354. # to generate these.
  355. useMinifiedJs: process.env['MINIFIED_JS'] == 'true' or false
  356. # Should static assets be sent with a header to tell the browser to cache
  357. # them.
  358. cacheStaticAssets: false
  359. # If you are running ShareLaTeX over https, set this to true to send the
  360. # cookie with a secure flag (recommended).
  361. secureCookie: false
  362. # 'SameSite' cookie setting. Can be set to 'lax', 'none' or 'strict'
  363. # 'lax' is recommended, as 'strict' will prevent people linking to projects
  364. # https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7
  365. sameSiteCookie: 'lax'
  366. # If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
  367. # then set this to true to allow it to correctly detect the forwarded IP
  368. # address and http/https protocol information.
  369. behindProxy: false
  370. # Cookie max age (in milliseconds). Set to false for a browser session.
  371. cookieSessionLength: 5 * 24 * 60 * 60 * 1000 # 5 days
  372. # When true, only allow invites to be sent to email addresses that
  373. # already have user accounts
  374. restrictInvitesToExistingAccounts: false
  375. # Should we allow access to any page without logging in? This includes
  376. # public projects, /learn, /templates, about pages, etc.
  377. allowPublicAccess: if process.env["SHARELATEX_ALLOW_PUBLIC_ACCESS"] == 'true' then true else false
  378. enableHomepage: process.env["HOME_PAGE_ENABLED"] == 'true'
  379. # editor should be open by default
  380. editorIsOpen: if process.env["EDITOR_OPEN"] == 'false' then false else true
  381. # site should be open by default
  382. siteIsOpen: if process.env["SITE_OPEN"] == 'false' then false else true
  383. # Use a single compile directory for all users in a project
  384. # (otherwise each user has their own directory)
  385. # disablePerUserCompiles: true
  386. # Domain the client (pdfjs) should download the compiled pdf from
  387. pdfDownloadDomain: process.env["PDF_DOWNLOAD_DOMAIN"] #"http://clsi-lb:3014"
  388. # Maximum size of text documents in the real-time editing system.
  389. max_doc_length: 2 * 1024 * 1024 # 2mb
  390. # Maximum JSON size in HTTP requests
  391. # We should be able to process twice the max doc length, to allow for
  392. # - the doc content
  393. # - text ranges spanning the whole doc
  394. #
  395. # There's also overhead required for the JSON encoding and the UTF-8 encoding,
  396. # theoretically up to 3 times the max doc length. On the other hand, we don't
  397. # want to block the event loop with JSON parsing, so we try to find a
  398. # practical compromise.
  399. max_json_request_size: parseInt(process.env["MAX_JSON_REQUEST_SIZE"]) || 6 * 1024 * 1024 # 6 MB
  400. # Internal configs
  401. # ----------------
  402. path:
  403. # If we ever need to write something to disk (e.g. incoming requests
  404. # that need processing but may be too big for memory, then write
  405. # them to disk here).
  406. dumpFolder: "./data/dumpFolder"
  407. uploadFolder: "./data/uploads"
  408. # Automatic Snapshots
  409. # -------------------
  410. automaticSnapshots:
  411. # How long should we wait after the user last edited to
  412. # take a snapshot?
  413. waitTimeAfterLastEdit: 5 * minutes
  414. # Even if edits are still taking place, this is maximum
  415. # time to wait before taking another snapshot.
  416. maxTimeBetweenSnapshots: 30 * minutes
  417. # Smoke test
  418. # ----------
  419. # Provide log in credentials and a project to be able to run
  420. # some basic smoke tests to check the core functionality.
  421. #
  422. smokeTest:
  423. user: process.env['SMOKE_TEST_USER']
  424. userId: process.env['SMOKE_TEST_USER_ID']
  425. password: process.env['SMOKE_TEST_PASSWORD']
  426. projectId: process.env['SMOKE_TEST_PROJECT_ID']
  427. rateLimitSubject: process.env['SMOKE_TEST_RATE_LIMIT_SUBJECT'] or "127.0.0.1"
  428. appName: process.env['APP_NAME'] or "ShareLaTeX (Community Edition)"
  429. adminEmail: process.env['ADMIN_EMAIL'] or "placeholder@example.com"
  430. salesEmail: process.env['SALES_EMAIL'] or "placeholder@example.com"
  431. statusPageUrl: process.env['OVERLEAF_STATUS_URL'] or "status.overleaf.com"
  432. brandPrefix: process.env['BRAND_PREFIX'] or "sl-" # Set to 'ol-' for overleaf styles
  433. nav:
  434. title: "ShareLaTeX Community Edition"
  435. left_footer: [{
  436. text: "Powered by <a href='https://www.sharelatex.com'>ShareLaTeX</a> © 2016"
  437. }]
  438. right_footer: [{
  439. text: "<i class='fa fa-github-square'></i> Fork on Github!"
  440. url: "https://github.com/sharelatex/sharelatex"
  441. }]
  442. showSubscriptionLink: false
  443. header_extras: []
  444. # Example:
  445. # header_extras: [{text: "Some Page", url: "http://example.com/some/page", class: "subdued"}]
  446. recaptcha:
  447. disabled:
  448. invite: true
  449. register: true
  450. customisation: {}
  451. # templates: [{
  452. # name : "cv_or_resume",
  453. # url : "/templates/cv"
  454. # }, {
  455. # name : "cover_letter",
  456. # url : "/templates/cover-letters"
  457. # }, {
  458. # name : "journal_article",
  459. # url : "/templates/journals"
  460. # }, {
  461. # name : "presentation",
  462. # url : "/templates/presentations"
  463. # }, {
  464. # name : "thesis",
  465. # url : "/templates/thesis"
  466. # }, {
  467. # name : "bibliographies",
  468. # url : "/templates/bibliographies"
  469. # }, {
  470. # name : "view_all",
  471. # url : "/templates"
  472. # }]
  473. redirects:
  474. "/templates/index": "/templates/"
  475. reloadModuleViewsOnEachRequest: process.env['NODE_ENV'] == 'development'
  476. domainLicences: [
  477. ]
  478. sixpack:
  479. domain:""
  480. # ShareLaTeX Server Pro options (https://www.sharelatex.com/university/onsite.html)
  481. # ----------
  482. # LDAP
  483. # ----------
  484. # Settings below use a working LDAP test server kindly provided by forumsys.com
  485. # When testing with forumsys.com use username = einstein and password = password
  486. # ldap :
  487. # host: 'ldap://ldap.forumsys.com'
  488. # dn: 'uid=:userKey,dc=example,dc=com'
  489. # baseSearch: 'dc=example,dc=com'
  490. # filter: "(uid=:userKey)"
  491. # failMessage: 'LDAP User Fail'
  492. # fieldName: 'LDAP User'
  493. # placeholder: 'email@example.com'
  494. # emailAtt: 'mail'
  495. # anonymous: false
  496. # adminDN: 'cn=read-only-admin,dc=example,dc=com'
  497. # adminPW: 'password'
  498. # starttls: true
  499. # tlsOptions:
  500. # rejectUnauthorized: false
  501. # ca: ['/etc/ldap/ca_certs.pem']
  502. #templateLinks: [{
  503. # name : "CV projects",
  504. # url : "/templates/cv"
  505. #},{
  506. # name : "all projects",
  507. # url: "/templates/all"
  508. #}]
  509. rateLimit:
  510. autoCompile:
  511. everyone: process.env['RATE_LIMIT_AUTO_COMPILE_EVERYONE'] or 100
  512. standard: process.env['RATE_LIMIT_AUTO_COMPILE_STANDARD'] or 25
  513. # currentImage: "texlive-full:2017.1"
  514. # imageRoot: "<DOCKER REPOSITORY ROOT>" # without any trailing slash
  515. compileBodySizeLimitMb: process.env['COMPILE_BODY_SIZE_LIMIT_MB'] or 5
  516. validRootDocExtensions: ['tex', 'Rtex', 'ltx']
  517. emailConfirmationDisabled: (process.env['EMAIL_CONFIRMATION_DISABLED'] == "true") or false
  518. # allowedImageNames: [
  519. # {imageName: 'texlive-full:2017.1', imageDesc: 'TeXLive 2017'}
  520. # {imageName: 'wl_texlive:2018.1', imageDesc: 'Legacy OL TeXLive 2015'}
  521. # {imageName: 'texlive-full:2016.1', imageDesc: 'Legacy SL TeXLive 2016'}
  522. # {imageName: 'texlive-full:2015.1', imageDesc: 'Legacy SL TeXLive 2015'}
  523. # {imageName: 'texlive-full:2014.2', imageDesc: 'Legacy SL TeXLive 2014.2'}
  524. # ]
  525. # module options
  526. # ----------
  527. modules:
  528. sanitize:
  529. options:
  530. allowedTags: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'col', 'caption', 'tbody', 'tr', 'th', 'td', 'tfoot', 'pre', 'iframe', 'img', 'figure', 'figcaption', 'span', 'source', 'video', 'del' ]
  531. allowedAttributes:
  532. 'a': [ 'href', 'name', 'target', 'class', 'event-tracking', 'event-tracking-ga', 'event-tracking-label', 'event-tracking-trigger' ]
  533. 'div': [ 'class', 'id', 'style' ]
  534. 'h1': [ 'class', 'id' ]
  535. 'h2': [ 'class', 'id' ]
  536. 'h3': [ 'class', 'id' ]
  537. 'h4': [ 'class', 'id' ]
  538. 'h5': [ 'class', 'id' ]
  539. 'h6': [ 'class', 'id' ]
  540. 'col': [ 'width' ]
  541. 'figure': [ 'class', 'id', 'style']
  542. 'figcaption': [ 'class', 'id', 'style']
  543. 'i': [ 'aria-hidden', 'aria-label', 'class', 'id' ]
  544. 'iframe': [ 'allowfullscreen', 'frameborder', 'height', 'src', 'style', 'width' ]
  545. 'img': [ 'alt', 'class', 'src', 'style' ]
  546. 'source': [ 'src', 'type' ]
  547. 'span': [ 'class', 'id', 'style' ]
  548. 'table': [ 'border', 'class', 'id', 'style' ]
  549. 'td': [ 'colspan', 'rowspan', 'headers', 'style' ]
  550. 'th': [ 'abbr', 'headers', 'colspan', 'rowspan', 'scope', 'sorted', 'style' ]
  551. 'tr': [ 'class' ]
  552. 'video': [ 'alt', 'class', 'controls', 'height', 'width' ]