Download the PHP package stacknuts/magento-csp-debug without Composer

On this page you can find all versions of the php package stacknuts/magento-csp-debug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento-csp-debug

StackNuts CSP Debug

Latest Version License PHP Version

See your storefront's actual Content Security Policy right on the page — no devtools required.

Why

Magento assembles its CSP from several places at once — core defaults, admin config, and rules added by third-party modules via config.xml or csp_whitelist.xml. Today, the only way to see what actually ends up in the header is to load the page and dig through the network tab by hand, every time you add a script, an iframe, or a third-party integration.

This module surfaces that same information directly on the page: a small icon that opens a panel listing every active directive exactly as Magento assembled it. You can tell in seconds whether the CSP will block something you just added, instead of finding out from a console error later.

Screenshots

A small padlock icon sits fixed in the corner of the storefront whenever the panel is active:

Clicking it opens the panel:

On a Hyvä store, the same panel renders natively in Tailwind CSS and Alpine.js instead — no jQuery/RequireJS modal:

Installation

The module ships a LESS partial, so redeploy static content for your theme afterwards:

Hyvä compatibility

If a Hyvä theme is active, the module automatically swaps in a Hyvä-native version of the panel — same data, rebuilt with Tailwind CSS and a native <dialog> + Alpine.js modal, no extra configuration needed. This is wired through Hyvä's own hyva_ layout-handle convention, so it has zero effect on Luma installs and needs no separate compatibility module.

Enabling it

Stores → Configuration → Security → Content Security Policy (CSP) → Debug → Enable CSP debug panel

The panel needs both of these to be true before it renders: the toggle above is on, and the request already has developer-level access — developer mode, or an IP allow-listed under dev/restrict/allow_ips. Leave it enabled in production and it simply stays invisible to everyone else.

Requirements

Contributing

See https://github.com/StackNuts/magento-csp-debug/issues

License

MIT — see LICENSE.


All versions of magento-csp-debug with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
magento/framework Version >=103.0 <104
magento/module-csp Version >=100.4 <101
magento/module-developer Version >=100.4 <101
magento/module-store Version >=100.0 <102
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stacknuts/magento-csp-debug contains the following files

Loading the files please wait ...