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

9 lines
314 B
TypeScript
Raw Normal View History

import * as basicAuth from 'express-basic-auth';
2017-02-15 07:37:00 +00:00
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
});
}