Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tobias-kaerst-software/elysia-helmet
Help secure Elysia apps with various HTTP headers 🔒
https://github.com/tobias-kaerst-software/elysia-helmet
bun elysia elysia-plugin helmet
Last synced: 17 days ago
JSON representation
Help secure Elysia apps with various HTTP headers 🔒
- Host: GitHub
- URL: https://github.com/tobias-kaerst-software/elysia-helmet
- Owner: tobias-kaerst-software
- License: mit
- Created: 2023-09-05T15:55:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-21T14:50:36.000Z (6 months ago)
- Last Synced: 2024-10-16T20:05:19.976Z (about 2 months ago)
- Topics: bun, elysia, elysia-plugin, helmet
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/elysia-helmet
- Size: 29.3 KB
- Stars: 32
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-elysia - Helmet - Secure apps with various HTTP headers. (Plugins)
README
# Elysia Helmet
Helmet helps secure Elysia apps by setting HTTP response headers. This is a port of the official [helmet](https://github.com/helmetjs/helmet) plugin for express.
## 🧑💻 Install
```
bun add elysia-helmet
```## 👋 Getting Started
Here's a sample Elysia app that uses Helmet:
```typescript
import { Elysia } from 'elysia';
import { helmet } from 'elysia-helmet';new Elysia().use(helmet()).listen(3000);
```For more configuration options, please refer to the original [helmet documentation](https://github.com/helmetjs/helmet).
> There seems to be a bug in the current version of Elysia that prevents the headers from being set correctly. As a workaround, you can use the aot flag must be set to false.
>
> ```typescript
> new Elysia({ aot: false }).use(helmet()).listen(3000);
> ```
>
> Refer to this [Issue](https://github.com/elysiajs/elysia/issues/625).## 🔓 License
This software ist distributed under the MIT license. For more information you can have a look at the [license file](./LICENSE).