This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
tstatic/src/middleware/basic-auth.ts

8 lines
314 B
TypeScript

import * as basicAuth from 'express-basic-auth';
export default function basicAuthHandler(username : string, password : string) {
return basicAuth({
authorizer: (req_username : string, req_password : string) => req_username === username && req_password === password,
challenge: true
});
}