Skip to content

Commit

Permalink
try setting DEFAULT_MAX_AGE
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 9, 2024
1 parent b2cbfdb commit a1517ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function isProtected(req) {
server.use(precompress());
server.use(expires());
// pass your preferred security header options:
const DEFAULT_MAX_AGE = 365 * 86400;
server.use(csp({
"Strict-Transport-Security": {
maxAge: DEFAULT_MAX_AGE,
Expand Down

1 comment on commit a1517ae

@deno-deploy
Copy link
Contributor

@deno-deploy deno-deploy bot commented on a1517ae Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

UNCAUGHT_EXCEPTION

TypeError: headers.set is not a function
    at csp (https://raw.githubusercontent.com/lumeland/csp/refs/heads/main/mod.ts:238:13)
    at file:///src/serve.ts:43:12

Please sign in to comment.