honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
18.69k stars 529 forks source link

Secure-Headers delete "X-Powered-By" should be an option. #3175

Closed EdamAme-x closed 1 month ago

EdamAme-x commented 1 month ago

Discussed in https://github.com/orgs/honojs/discussions/3174

Originally posted by **EdamAme-x** July 22, 2024 Maybe to avoid guessing the server configuration, but I think this should be an option. https://github.com/honojs/hono/blob/main/src/middleware/secure-headers/secure-headers.ts#L192
EdamAme-x commented 1 month ago

If anyone who sees this issue and is having trouble with the x-powered-by not including, it works by putting the middleware forward.

image

OR

secureHeaders({...}, { removePoweredBy: false })