Skip to content

Commit 75b4184

Browse files
committed
feat: readme
1 parent fe43ea2 commit 75b4184

File tree

3 files changed

+34
-36
lines changed

3 files changed

+34
-36
lines changed

README.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
[![nuxt-security](https://nuxt-security.vercel.app/preview.png)](https://nuxt-security.vercel.app)
22

3-
# nuxt-security
43

54
[![npm version][npm-version-src]][npm-version-href]
65
[![npm downloads][npm-downloads-src]][npm-downloads-href]
76
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
87
[![License][license-src]][license-href]
98
[![Nuxt][nuxt-src]][nuxt-href]
109

11-
> Security module for Nuxt based on [OWASP Top 10](https://cheatsheetseries.owasp.org/cheatsheets/Nodejs_Security_Cheat_Sheet.html#nodejs-security-cheat-sheet) and [helmet](https://helmetjs.github.io/) that adds security response headers, protection middlewares, CORS, and more.
10+
# Nuxt Security
11+
12+
Automatically configure your app to follow OWASP security patterns and principles by using HTTP Headers and Middleware.
13+
14+
> This module works with Nuxt 3 only
1215
1316
- [📖  Read the documentation](https://nuxt-security.vercel.app)
1417
- [👾  Playground](https://stackblitz.com/github/baroshem/nuxt-security?file=.stackblitz%2Fnuxt.config.ts)
1518
- [ Intro video](https://www.youtube.com/watch?v=8ac30Py8Ses)
1619

1720
## Features
1821

19-
- Nuxt 3 ready
20-
- Security response headers
21-
- Content Security Policy (CSP) for SSG apps
22+
- Security response headers (including CSP for SSG apps)
2223
- Request Size & Rate Limiters
2324
- Cross Site Scripting (XSS) Validation
2425
- Cross-Origin Resource Sharing (CORS) support
26+
- Hide `X-Powered-By` header and remove console loggers utils
2527
- `[Optional]` Allowed HTTP Methods, Basic Auth, CSRF
2628

2729
## Usage
@@ -44,10 +46,6 @@ export default defineNuxtConfig({
4446

4547
And that's it! The module will now register route rules and server middlewares globally so that your application will be more secured.
4648

47-
## Static site generation (SSG)
48-
49-
This module is meant to work with SSR apps, but you can also use this module in SSG apps where you will get a Content Security Policy (CSP) support via `<meta http-equiv>` tag. You can find more about configuring Content Security Policy (CSP) [here](https://nuxt-security.vercel.app/security/headers#content-security-policy).
50-
5149
## Configuration
5250

5351
You can pass configuration to the module in the `nuxt.config.ts` like following:

docs/yarn.lock

+25-25
Original file line numberDiff line numberDiff line change
@@ -1395,9 +1395,9 @@
13951395
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
13961396

13971397
"@types/node@*":
1398-
version "20.6.2"
1399-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.2.tgz#a065925409f59657022e9063275cd0b9bd7e1b12"
1400-
integrity sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==
1398+
version "20.6.3"
1399+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.3.tgz#5b763b321cd3b80f6b8dde7a37e1a77ff9358dd9"
1400+
integrity sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==
14011401

14021402
"@types/parse5@^6.0.0":
14031403
version "6.0.3"
@@ -1640,10 +1640,10 @@
16401640
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.0.tgz#98b99425edee70b4c992692628fa1ea2c1e57d07"
16411641
integrity sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==
16421642

1643-
1644-
version "1.8.11"
1645-
resolved "https://registry.yarnpkg.com/@vue/language-core/-/language-core-1.8.11.tgz#d10cc6f8f32e30991e0430f0d91db9416dc2e9a6"
1646-
integrity sha512-+MZOBGqGwfld6hpo0DB47x8eNM0dNqk15ZdfOhj19CpvuYuOWCeVdOEGZunKDyo3QLkTn3kLOSysJzg7FDOQBA==
1643+
1644+
version "1.8.12"
1645+
resolved "https://registry.yarnpkg.com/@vue/language-core/-/language-core-1.8.12.tgz#9eea3936f76280da64da5b1faa38993e102d057d"
1646+
integrity sha512-IYSr7ojQX2re7zMAKUKUYovuJ5IJoUI3PhgBRcpRBU29YnF/gDLf1c9ARtbnGPFvtDC+QP+/CfwVBxdPipBjEw==
16471647
dependencies:
16481648
"@volar/language-core" "~1.10.0"
16491649
"@volar/source-map" "~1.10.0"
@@ -2702,9 +2702,9 @@ [email protected]:
27022702
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
27032703

27042704
electron-to-chromium@^1.4.477:
2705-
version "1.4.523"
2706-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz#f82f99243c827df05c26776d49712cb284972df6"
2707-
integrity sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==
2705+
version "1.4.525"
2706+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.525.tgz#614284f33901fbecd3e90176c0d60590cd939700"
2707+
integrity sha512-GIZ620hDK4YmIqAWkscG4W6RwY6gOx1y5J6f4JUQwctiJrqH2oxZYU4mXHi35oV32tr630UcepBzSBGJ/WYcZA==
27082708

27092709
emoji-regex@^8.0.0:
27102710
version "8.0.0"
@@ -6088,9 +6088,9 @@ slugify@^1.6.6:
60886088
integrity sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw==
60896089

60906090
smob@^1.0.0:
6091-
version "1.4.0"
6092-
resolved "https://registry.yarnpkg.com/smob/-/smob-1.4.0.tgz#ac9751fe54b1fc1fc8286a628d4e7f824273b95a"
6093-
integrity sha512-MqR3fVulhjWuRNSMydnTlweu38UhQ0HXM4buStD/S3mc/BzX3CuM9OmhyQpmtYCvoYdl5ris6TI0ZqH355Ymqg==
6091+
version "1.4.1"
6092+
resolved "https://registry.yarnpkg.com/smob/-/smob-1.4.1.tgz#66270e7df6a7527664816c5b577a23f17ba6f5b5"
6093+
integrity sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==
60946094

60956095
snake-case@^3.0.4:
60966096
version "3.0.4"
@@ -6921,19 +6921,19 @@ vue-bundle-renderer@^2.0.0:
69216921
ufo "^1.2.0"
69226922

69236923
vue-component-meta@^1.2.0:
6924-
version "1.8.11"
6925-
resolved "https://registry.yarnpkg.com/vue-component-meta/-/vue-component-meta-1.8.11.tgz#0ec098efe3e1d8499720afb2008743ae36ee96c4"
6926-
integrity sha512-mEHK7Bnvlyl/zzSX/xmSpBxrbk4QQo5dL74loa0lTt8GTZe6ueXm52mK1wxkZ3411Nw4cTtq2hrUEynrQ34VpQ==
6924+
version "1.8.12"
6925+
resolved "https://registry.yarnpkg.com/vue-component-meta/-/vue-component-meta-1.8.12.tgz#424a6c405906c6659f75709f36cd83819f0bf315"
6926+
integrity sha512-zwK9VIodexLszichYaGHX+JMpN8b+AWFoy0oxAFe+LVBKlaXMsq0xPzuQIfwWlQRRJJbaKd6LbltZA6QSKCT/A==
69276927
dependencies:
69286928
"@volar/typescript" "~1.10.0"
6929-
"@vue/language-core" "1.8.11"
6929+
"@vue/language-core" "1.8.12"
69306930
typesafe-path "^0.2.2"
6931-
vue-component-type-helpers "1.8.11"
6931+
vue-component-type-helpers "1.8.12"
69326932

6933-
6934-
version "1.8.11"
6935-
resolved "https://registry.yarnpkg.com/vue-component-type-helpers/-/vue-component-type-helpers-1.8.11.tgz#26e208896bb56a2256dae7e45ac17b07eaa94fb5"
6936-
integrity sha512-CWItFzuEWjkSXDeMGwQEc5cFH4FaueyPQHfi1mBDe+wA2JABqNjFxFUtmZJ9WHkb0HpEwqgBg1umiXrWYXkXHw==
6933+
6934+
version "1.8.12"
6935+
resolved "https://registry.yarnpkg.com/vue-component-type-helpers/-/vue-component-type-helpers-1.8.12.tgz#7a1856dff0c2f79990bce059708fcbdea91bfe2f"
6936+
integrity sha512-R7MsmHaPVWbv9sdZYq32IJgx8m/GYzxlLGgEECQ16UbRIYGWW9w7J7pW3QHvr/VfFHtnyiVrsO/rAEtmBi1lGw==
69376937

69386938
vue-demi@*, vue-demi@>=0.14.5:
69396939
version "0.14.6"
@@ -7053,9 +7053,9 @@ wrappy@1:
70537053
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
70547054

70557055
ws@^8.13.0:
7056-
version "8.14.1"
7057-
resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.1.tgz#4b9586b4f70f9e6534c7bb1d3dc0baa8b8cf01e0"
7058-
integrity sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==
7056+
version "8.14.2"
7057+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f"
7058+
integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==
70597059

70607060
ws@~8.11.0:
70617061
version "8.11.0"

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "nuxt-security",
3-
"version": "0.14.4",
3+
"version": "1.0.0-rc.1",
44
"license": "MIT",
55
"type": "module",
66
"homepage": "https://nuxt-security.vercel.app",
7-
"description": "🛡 Security Module for Nuxt based on OWASP Top 10 and Helmet",
7+
"description": "🛡 Security Module for Nuxt based on HTTP Headers and Middleware",
88
"repository": {
99
"url": "https://github.com/Baroshem/nuxt-security"
1010
},

0 commit comments

Comments
 (0)