mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-09-14 10:52:34 +00:00
Convert backend to ESM
- About 5 years overdue - Remove eslint, use bomejs instead
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
module.exports = function () {
|
||||
return function (req, res, next) {
|
||||
export default function () {
|
||||
return (req, res, next) => {
|
||||
if (req.headers.authorization) {
|
||||
let parts = req.headers.authorization.split(' ');
|
||||
const parts = req.headers.authorization.split(" ");
|
||||
|
||||
if (parts && parts[0] === 'Bearer' && parts[1]) {
|
||||
if (parts && parts[0] === "Bearer" && parts[1]) {
|
||||
res.locals.token = parts[1];
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user