forked from Baroshem/security
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
167 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Setup | ||
description: "Having more secure Nuxt project is only one command away ✨" | ||
--- | ||
|
||
## Installation | ||
|
||
1. Install `nuxt-security` module: | ||
|
||
::code-group | ||
|
||
```bash [Yarn] | ||
yarn add --dev nuxt-security | ||
``` | ||
|
||
```bash [NPM] | ||
npm install nuxt-security --save-dev | ||
``` | ||
|
||
```bash [PNPM] | ||
pnpm add -D nuxt-security | ||
``` | ||
|
||
:: | ||
|
||
2. Enable the module in your Nuxt configuration: | ||
|
||
```js{}[nuxt.config.ts] | ||
export default defineNuxtConfig({ | ||
modules: ['nuxt-security'] | ||
}) | ||
``` | ||
|
||
::alert{type="success"} | ||
That's it! The Nuxt Security module will now register routeRoules and middlewares to make your application more secure ✨ | ||
:: | ||
|
||
## Configuration | ||
|
||
You can add configuration to the module like following: | ||
|
||
```js{}[nuxt.config.ts] | ||
export default defineNuxtConfig({ | ||
security: { | ||
// options | ||
} | ||
}) | ||
``` | ||
|
||
::alert{type="info"} | ||
You can find more about configuring `nuxt-security` [here](/getting-started/configuration). | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.