vitamin2/juicebox

This is the core Statamic addon used by VITAMIN 2.

Maintainers

Package info

bitbucket.org/vitamin2/juicebox

Type:statamic-addon

pkg:composer/vitamin2/juicebox

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

0.1.0 2026-06-02 09:35 UTC

This package is auto-updated.

Last update: 2026-06-23 15:48:45 UTC


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\Features\SecureHeaders\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=statamic-juicebox-secure-headers-config
KeyDefaultAccepted values
enabledtruetrue, false
strict_transport_security'max-age=31536000'Valid HSTS directive string, false
x_frame_options'SAMEORIGIN''DENY', 'SAMEORIGIN', false
x_content_type_options'nosniff''nosniff', false
referrer_policy'strict-origin-when-cross-origin'Any valid policy string, false

Set any value to false to omit that header entirely.

Environment variables

VariableDefaultDescription
JUICEBOX_SECURE_HEADERS_ENABLEDtrueMaster toggle — disables all headers when false.