• Stars
    star
    785
  • Rank 57,957 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ›‘ Automatically configure your app to follow OWASP security patterns and principles by using HTTP Headers and Middleware

nuxt-security

nuxt-security

npm version npm downloads Github Actions CI License Nuxt

Security module for Nuxt based on OWASP Top 10 and helmet that adds security response headers, protection middlewares, CORS, and more.

Features

  • Nuxt 3 ready
  • Security response headers
  • Content Security Policy (CSP) for SSG apps
  • Request Size & Rate Limiters
  • Cross Site Scripting (XSS) Validation
  • Cross-Origin Resource Sharing (CORS) support
  • [Optional] Allowed HTTP Methods, Basic Auth, CSRF

Usage

Install the module:

npm i -D nuxt-security
yarn add -D nuxt-security
pnpm add -D nuxt-security

Add the module in the modules array in nuxt.config.ts:

export default defineNuxtConfig({
  modules: ["nuxt-security"],
})

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

Static site generation (SSG)

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.

Configuration

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

export default defineNuxtConfig({
  modules: ["nuxt-security"],
  security: {
    // options
  }
})

For all available configuration options check out the docs.

Development

  • Run yarn dev:prepare to generate type stubs.
  • Use yarn dev to start playground in development mode.

License

MIT License

More Repositories

1

microservice-template

πŸ“– Nest.js based microservice repository template
TypeScript
249
star
2

nuxt-medusa

πŸ›οΈ Medusa module for Nuxt
TypeScript
128
star
3

nuxt-lazy-hydrate

πŸ’¦ Lazy Hydration Module for Nuxt
TypeScript
89
star
4

nuxt-newsletter

βœ‰οΈ Nuxt module for first class integration with popular newsletter providers
TypeScript
57
star
5

nuxt-shopify-tailwind

Headless Commerce website with Nuxt 3, Shopify, and Tailwindcss
Vue
57
star
6

cache

πŸ”‹ Browser and Server Cache module for Nuxt 3
TypeScript
35
star
7

compression

πŸ—œ Compression module for Nuxt 3
TypeScript
32
star
8

lazy-load

πŸŒ… Lazy Loading module for Nuxt 3
TypeScript
29
star
9

next-security

πŸ›‘ Security plugin for Next.js based on OWASP and Helmet
TypeScript
25
star
10

nuxt3-structure-modules-pinia

Using Modules and Pinia to structure Nuxt 3 app
TypeScript
23
star
11

nuxt-shopify-storyblok

Composable Commerce with Nuxt, Shopify, and Storyblok
Vue
23
star
12

nuxt-histoire

Histoire module for Nuxt 3
TypeScript
12
star
13

nuxt-backend

Example Nuxt Backend Microservice
TypeScript
10
star
14

map

πŸ—Ί Map Module for Nuxt 3
Vue
10
star
15

nest-microservice

TypeScript
10
star
16

nest-demo

TypeScript
9
star
17

nuxt-module-template

TypeScript
8
star
18

nuxt3-algolia

Nuxt 3 with Algolia search boilerplate project
Vue
7
star
19

nuxt-helm

Security Headers Module for Nuxt 3
TypeScript
6
star
20

nuxt3-tailwind-supabase

Cat Image Gallery built with Nuxt 3, TailwindCSS and Supabase, deployed to Vercel
Vue
6
star
21

nuxt3-algolia-storyblok

Nuxt 3 starter with Algolia, Storyblok, and Indexer
TypeScript
5
star
22

nuxt-a11y

πŸ‘€ Accessibility (A11Y) Module for Nuxt
TypeScript
5
star
23

nuxt-apollo-tailwind

Repository for Nuxt 3, Apollo, and Tailwind Crash Course
Vue
4
star
24

nuxt-partytown

Demo of improving Performance in Nuxt with Partytown and Plausible
TypeScript
4
star
25

nuxt-lighthouse-ci

Demo repository of Nuxt.js project with Lighthouse CI Github workflows
Vue
3
star
26

nuxt-tailwind-medusa

Demo application for the article about Nuxt, Medusa, and Tailwind
Vue
3
star
27

jamstack-nuxt-storyblok

Example Jamstack app with Nuxt 3, Content, and Storyblok deployed to Vercel
Vue
2
star
28

nuxt3-algolia-stackblitz

A demo of Nuxt 3 with Algolia and deployed to Stackblitz
Vue
1
star
29

nuxt-medusa-tailwind

Simple Headless Commerce with Nuxt, Medusa, and TailwindCSS
Vue
1
star
30

dxp-nuxt3-storyblok-algolia-tailwindcss

Digital Experience Platform with Nuxt 3, Storyblok, Algolia, and TailwindCSS
Vue
1
star
31

test-shopify-storyblok

Vue
1
star
32

nuxt-commerce-theme

Vue
1
star
33

vsf2-custom-integration-example

Example of Custom Integration for VSF 2
TypeScript
1
star
34

headless-avuengers

Demo of Nuxt 3 app powered by Headless CMS and Search Engine
Vue
1
star
35

nuxt-storyblok-shopify

Vue
1
star
36

nuxt-image-gallery

Vue
1
star
37

nuxt-storyblok-algolia-tailwindcss

Simple Digital Experience Platform (DXP) with Nuxt 3, Algolia, Storyblok, and TailwindCSS deployed to Vercel
Vue
1
star