kenshodigital/kirby-csp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kenshodigital/kirby-csp

最新稳定版本:1.1.0

Composer 安装命令:

composer require kenshodigital/kirby-csp

包简介

Adds a strict CSP header to Kirby projects.

README 文档

README

Adds a strict CSP header to Kirby projects.

General

Uses Kirby’s native nonce feature (used for the panel) to add a strict nonce-based content security policy header to all Kirby responses.

Further reading

Usage

Installation

composer require kenshodigital/kirby-csp ^1.1

Setup

The plugin is not configurable and just follows the latest best practices.

script-src 'nonce-[…]' 'strict-dynamic' 'unsafe-inline' https:; object-src 'none'; base-uri 'none';

Development

However, scripts in your frontend are expected to include a nonce, like this.

<script nonce="<?= $kirby->nonce() ?>">
  
</script>

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-17