Skip to content

Commit

Permalink
Security: add temporary response header to see what kind of requests …
Browse files Browse the repository at this point in the history
…… (#52726)
  • Loading branch information
heiskr authored Oct 16, 2024
1 parent 6893804 commit 79269b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/frame/middleware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ export default function (app: Express) {
// *** Headers ***
app.set('etag', false) // We will manage our own ETags if desired

// temporary
app.use(function (req, res, next) {
res.set('x-ptcl', req.secure ? 'o' : 'x')
next()
})

// *** Config and context for redirects ***
app.use(detectLanguage) // Must come before context, breadcrumbs, find-page, handle-errors, homepages
app.use(asyncMiddleware(reloadTree)) // Must come before context
Expand Down

0 comments on commit 79269b5

Please sign in to comment.