kopia lustrzana https://github.com/manuelkasper/sotlas-api
Fix jwt
rodzic
cdba5c193a
commit
f56fe05622
|
@ -2,7 +2,7 @@ const express = require('express')
|
|||
const multer = require('multer')
|
||||
const config = require('./config')
|
||||
const photos = require('./photos')
|
||||
const jwt = require('express-jwt')
|
||||
var { expressjwt: jwt } = require("express-jwt")
|
||||
const jwksRsa = require('jwks-rsa')
|
||||
const db = require('./db')
|
||||
|
||||
|
@ -17,7 +17,8 @@ let jwtCallback = jwt({
|
|||
rateLimit: true,
|
||||
jwksRequestsPerMinute: 5,
|
||||
jwksUri: config.sso.jwksUri
|
||||
})
|
||||
}),
|
||||
algorithms: ['RS256']
|
||||
})
|
||||
|
||||
router.post('/summits/:association/:code/upload', jwtCallback, upload.array('photo'), async (req, res) => {
|
||||
|
|
Ładowanie…
Reference in New Issue