mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-06 00:11:24 +00:00
Re-add dropbox webhook signature verification and decaf cleanup (#6735)
* Re-apply #6352 dropbox webhook signature verification/ decaf cleanup * Add verification for Sharelatex legacy dropbox app signature * Add SL and OL dropbox app secrets to web secrets GitOrigin-RevId: 0aa2e8371069a09330850218124937d4e03e75bb
This commit is contained in:
parent
5ded04eaea
commit
c47eefae5e
2 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,14 @@ function loadViewIncludes(app) {
|
|||
}
|
||||
}
|
||||
|
||||
function registerAppMiddleware(app) {
|
||||
for (const module of _modules) {
|
||||
if (module.appMiddleware) {
|
||||
module.appMiddleware(app)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function moduleIncludes(view, locals) {
|
||||
const compiledPartials = _viewIncludes[view] || []
|
||||
let html = ''
|
||||
|
@ -144,6 +152,7 @@ module.exports = {
|
|||
loadViewIncludes,
|
||||
moduleIncludes,
|
||||
moduleIncludesAvailable,
|
||||
registerAppMiddleware,
|
||||
hooks: {
|
||||
attach: attachHook,
|
||||
fire: fireHook,
|
||||
|
|
|
@ -132,6 +132,7 @@ app.set('views', Path.join(__dirname, '/../../views'))
|
|||
app.set('view engine', 'pug')
|
||||
Modules.loadViewIncludes(app)
|
||||
|
||||
Modules.registerAppMiddleware(app)
|
||||
app.use(bodyParser.urlencoded({ extended: true, limit: '2mb' }))
|
||||
app.use(bodyParser.json({ limit: Settings.max_json_request_size }))
|
||||
app.use(methodOverride())
|
||||
|
|
Loading…
Reference in a new issue