mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
correct config value for GITHUB_WEBHOOK, log every request for debugging purposes
This commit is contained in:
parent
1e39f5049b
commit
e378136106
@ -59,7 +59,7 @@ const webhook = {
|
|||||||
// Elopage
|
// Elopage
|
||||||
WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret',
|
WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret',
|
||||||
// Github
|
// Github
|
||||||
WEBHOOK_GITHUB: process.env.WEBHOOK_GITHUB || false,
|
WEBHOOK_GITHUB: process.env.WEBHOOK_GITHUB === 'true' || false,
|
||||||
WEBHOOK_GITHUB_SECRET: process.env.WEBHOOK_GITHUB_SECRET || '',
|
WEBHOOK_GITHUB_SECRET: process.env.WEBHOOK_GITHUB_SECRET || '',
|
||||||
WEBHOOK_GITHUB_PAYLOAD_LIMIT: process.env.WEBHOOK_GITHUB_PAYLOAD_LIMIT || '1mb',
|
WEBHOOK_GITHUB_PAYLOAD_LIMIT: process.env.WEBHOOK_GITHUB_PAYLOAD_LIMIT || '1mb',
|
||||||
WEBHOOK_GITHUB_BRANCH: process.env.WEBHOOK_GITHUB_BRANCH || 'master',
|
WEBHOOK_GITHUB_BRANCH: process.env.WEBHOOK_GITHUB_BRANCH || 'master',
|
||||||
|
|||||||
@ -65,6 +65,13 @@ const createServer = async (context: any = serverContext): Promise<any> => {
|
|||||||
// bodyparser text for elopage
|
// bodyparser text for elopage
|
||||||
app.use(express.text())
|
app.use(express.text())
|
||||||
|
|
||||||
|
// Log every request
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(req)
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
|
||||||
// Elopage Webhook
|
// Elopage Webhook
|
||||||
app.post('/hook/elopage/' + CONFIG.WEBHOOK_ELOPAGE_SECRET, elopageWebhook)
|
app.post('/hook/elopage/' + CONFIG.WEBHOOK_ELOPAGE_SECRET, elopageWebhook)
|
||||||
// Github Webhook
|
// Github Webhook
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user