import { isAuthenticated } from "https://esm.town/v/pomdtr/basicAuth";
export default async function(req: Request): Promise<Response> {
if (!await isAuthenticated(req)) {
return new Response("Unauthorized", {
status: 401,
headers: {
"WWW-Authenticate": "Basic",
},
});
}
return new Response("Well played!");
}