@wnodex/helmet 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/README.md +66 -5
- package/package.json +10 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
> @wnodex/helmet@0.2.
|
|
2
|
+
> @wnodex/helmet@0.2.2 build /home/runner/work/wnodex/wnodex/packages/helmet
|
|
3
3
|
> rolldown -c && tsc
|
|
4
4
|
|
|
5
5
|
[log] <DIR>/index.js chunk │ size: 0.97 kB
|
|
6
6
|
[log]
|
|
7
|
-
[success] rolldown v1.0.0-rc.1 Finished in
|
|
7
|
+
[success] rolldown v1.0.0-rc.1 Finished in 13.71 ms
|
package/README.md
CHANGED
|
@@ -1,14 +1,75 @@
|
|
|
1
1
|
# @wnodex/helmet
|
|
2
2
|
|
|
3
|
-
wnodex helmet middleware
|
|
3
|
+
> wnodex helmet middleware
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Part of the [wnodex](https://github.com/wnodex/wnodex) ecosystem, this package provides security-focused middleware using Helmet.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## About
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`@wnodex/helmet` integrates the `helmet` middleware to help secure your `wnodex` application by setting various HTTP headers. It provides sensible defaults to protect against common web vulnerabilities.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Simple integration with `wnodex`.
|
|
14
|
+
- Sets important security headers like `Content-Security-Policy`, `Strict-Transport-Security`, and more.
|
|
15
|
+
- Configurable to disable or customize specific headers.
|
|
16
|
+
- Based on the popular `helmet` library.
|
|
17
|
+
|
|
18
|
+
## Why use it?
|
|
19
|
+
|
|
20
|
+
Security is a primary concern for any web application. `@wnodex/helmet` makes it easy to apply a baseline of security measures with zero configuration. By managing it within `wnodex`, you ensure that security headers are applied consistently across your application.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
You can install the package using your favorite package manager:
|
|
25
|
+
|
|
26
|
+
**pnpm**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm add @wnodex/helmet
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**npm**
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @wnodex/helmet
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**yarn**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
yarn add @wnodex/helmet
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**bun**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bun add @wnodex/helmet
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
`@wnodex/helmet` is disabled by default. To enable it with default settings, set `helmet: true`. You can also pass a configuration object to customize its behavior.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { Wnodex } from 'wnodex';
|
|
56
|
+
|
|
57
|
+
// Example: Enable Helmet with default settings
|
|
58
|
+
const server = new Wnodex({
|
|
59
|
+
helmet: true,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Example: Customize Helmet options
|
|
63
|
+
const serverWithCustomHelmet = new Wnodex({
|
|
64
|
+
helmet: {
|
|
65
|
+
contentSecurityPolicy: false, // Disable a specific middleware
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
server.start();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The options object is passed directly to the `helmet` library.
|
|
12
73
|
|
|
13
74
|
## License
|
|
14
75
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wnodex/helmet",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "wnodex
|
|
5
|
+
"description": "A wnodex middleware that integrates Helmet to secure your application by setting various HTTP headers.",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"wnodex"
|
|
7
|
+
"wnodex",
|
|
8
|
+
"middleware",
|
|
9
|
+
"helmet",
|
|
10
|
+
"express",
|
|
11
|
+
"security",
|
|
12
|
+
"headers",
|
|
13
|
+
"csp"
|
|
8
14
|
],
|
|
9
15
|
"homepage": "https://github.com/wnodex/wnodex#readme",
|
|
10
16
|
"bugs": {
|
|
@@ -38,7 +44,7 @@
|
|
|
38
44
|
"@types/node": "^25.0.10",
|
|
39
45
|
"rolldown": "1.0.0-rc.1",
|
|
40
46
|
"typescript": "5.9.2",
|
|
41
|
-
"@wnodex/typescript-config": "0.2.
|
|
47
|
+
"@wnodex/typescript-config": "0.2.2"
|
|
42
48
|
},
|
|
43
49
|
"publishConfig": {
|
|
44
50
|
"access": "public"
|