Skip to content

Commit

Permalink
serve precompressed, fix basic-auth import path
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 8, 2024
1 parent 2622d5a commit c50f77b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion serve.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Server from "lume/core/server.ts";
import { basicAuth } from "https://deno.land/x/[email protected]/middlewares/basic_auth.ts";
import { basicAuth } from "lume/middlewares/basic_auth.ts"
import precompress from "lume/middlewares/precompress.ts";

const server = new Server({
port: 8000,
Expand All @@ -22,6 +23,8 @@ server.use((req, next) => {
return next(req);
});

server.use(precompress());

function isProtected(req) {
const url = new URL(req.url);
return url.pathname.includes("/private/");
Expand Down

0 comments on commit c50f77b

Please sign in to comment.