settings.defaults.coffee 22 KB

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