mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor: server: auth: destructure
This commit is contained in:
parent
dff0267239
commit
da0e99ad8c
2 changed files with 5 additions and 4 deletions
|
|
@ -16,8 +16,9 @@ module.exports = (config) => {
|
|||
|
||||
function _middle(config, authentication, req, res, next) {
|
||||
const is = config('auth');
|
||||
const {originalUrl} = req;
|
||||
|
||||
if (!is || req.originalUrl.startsWith("/public/"))
|
||||
if (!is || originalUrl.startsWith('/public/'))
|
||||
return next();
|
||||
|
||||
const success = () => next();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue