Hey everyone,
Recently discovered and fell in love with Gleam. Having a blast learning the language and while setting up a web server I noticed there was no helmet.js equivalent with default security headers out-of-the-box.
Threw one together as a little side-quest and thought I'd share it here; works with wisp/mist or anything gleam_http based:
import gleam/http/response.{type Response}
import plume
pub fn handler() -> Response(String) {
use <- plume.middleware(plume.default())
response.new(200)
}
Every header (CSP, HSTS, Permissions Policy, etc.) can be customized via the submodules.
Would love any feedback!