Phápdansmaculotte/nuxt-security
Module for Nuxt.js to configure security headers and more
🔒 Bảo vệ ứng dụng Nuxt.js 2 với header bảo mật chuẩn
Cấu hình nhanh HSTS, CSP, Referrer-Policy, Permissions-Policy và sinh file security.txt chỉ bằng vài dòng.
@dansmaculotte/nuxt-security là module bảo mật dành cho Nuxt.js 2, giúp dễ dàng thiết lập các HTTP security headers mà không cần viết logic tùên chỉnh. Dựa trên thư viện helmet, module hỗ trợ cấu hình CSP, HSTS, Referrer-Policy, Permissions-Policy và sinh file security.txt.
✨ Điểm nổi bật
- Cấu hình HSTS: thiết lập
Strict-Transport-SecurityvớimaxAge,includeSubDomains,preload. - Content-Security-Policy: cấu hình CSP qua helmet để kiểm soát nguồn tài nguyên được tải.
- Referrer-Policy: kiểm soát thông tin referrer gửi khi chuyển trang.
- Permissions-Policy: thay thế
Feature-Policyđã ngưng dùng, kiểm soát quyền truy cập thiết bị/tính năng. - security.txt: tự động sinh file
security.txttheo chuẩn tại đường dẫn/.well-known/security.txt. - Additional headers: bật thêm
X-Frame-Options,X-Xss-Protection,X-Content-Type-Options. - Hỗ trợ SPA & Universal: sinh file
security.txtđúng vị trí tùy theo loại ứng dụng.
💡 Vì sao đáng chú ý
Module này giúp bạn áp dụng các header bảo mật cơ bản mà không cần phụ thuộc thủ công vào helmet. Dù hiện dự án không còn được bảo trợ, nó vẫn là lựa chọn nhẹ và hiệu quả cho dự án Nuxt 2. Với cấu hình qua nuxt.config.js, bạn có thể nhanh chóng tăng cường bảo mật cho ứng dụng mà không ảnh hưởng đến hiệu năng.
#NuxtJS #SecurityHeaders #CSP #OpenSource #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
A PHP library aiming to make the use of browser security features more accessible.
The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
Add Authentication to Nuxt applications with secured & sealed cookies sessions.