Skip to content

Commit

Permalink
remove csp
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 8, 2024
1 parent 61bff40 commit ab33ccd
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Server from "lume/core/server.ts";
import { basicAuth } from "lume/middlewares/basic_auth.ts"
import precompress from "lume/middlewares/precompress.ts";
import expires from "lume/middlewares/expires.ts";
import csp from "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/csp/mod.ts";
// import csp from "https://raw.githubusercontent.com/lumeland/experimental-plugins/main/csp/mod.ts";

const server = new Server({
port: 8000,
Expand Down Expand Up @@ -34,19 +34,19 @@ function isProtected(req) {
server.use(precompress());
server.use(expires());
// pass your preferred security header options:
server.use(csp({
"Strict-Transport-Security": {
maxAge: DEFAULT_MAX_AGE,
includeSubDomains: true,
preload: true,
},
"Referrer-Policy": ["no-referrer", "strict-origin-when-cross-origin"],
"X-Frame-Options": true,
"X-Content-Type-Options": true,
"X-XSS-Protection": true,
"X-Permitted-Cross-Domain-Policies": true,
"X-Powered-By": true,
}));
// server.use(csp({
// "Strict-Transport-Security": {
// maxAge: DEFAULT_MAX_AGE,
// includeSubDomains: true,
// preload: true,
// },
// "Referrer-Policy": ["no-referrer", "strict-origin-when-cross-origin"],
// "X-Frame-Options": true,
// "X-Content-Type-Options": true,
// "X-XSS-Protection": true,
// "X-Permitted-Cross-Domain-Policies": true,
// "X-Powered-By": true,
// }));

server.use(async (request, next) => {
const response = await next(request);
Expand Down

0 comments on commit ab33ccd

Please sign in to comment.