定制 vitamin2/juicebox 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

vitamin2/juicebox

Composer 安装命令:

composer require vitamin2/juicebox

包简介

This is the core Statamic addon used by VITAMIN 2.

README 文档

README

This is the core Statamic addon used by VITAMIN 2.

How to Install

You can install this addon via Composer:

composer require vitamin2/juicebox

Features

Secure Headers Middleware

Vitamin2\Juicebox\Http\Middleware\SetSecureHeaders

Appends security-related HTTP response headers to every request. Registered automatically via the service provider.

HeaderDefault valuePurpose
Strict-Transport-Securitymax-age=31536000Force HTTPS for 1 year. Only set on secure (HTTPS) requests.
X-Frame-OptionsSAMEORIGINPrevent clickjacking by controlling iframe embedding.
X-Content-Type-OptionsnosniffStop browsers from MIME-sniffing responses away from the declared content type.
Referrer-Policystrict-origin-when-cross-originLimit referrer info sent with cross-origin requests.

Configuration

Publish the config file:

php artisan vendor:publish --tag=juicebox-config

Override any header value in config/juicebox.php:

'secure_headers' => [
    'strict_transport_security' => 'max-age=63072000; includeSubDomains',
    'referrer_policy' => 'no-referrer',
],

Set any header to false to disable it entirely:

'secure_headers' => [
    'x_frame_options' => false,
],

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-02