webapps-cspolicy
Manage Content Security Policy (CSP) for web apps from the command line on Windows, Linux, and macOS systems
Since R2024b
Syntax
Description
webapps-cspolicy set
updates or adds a directive with the specified expression to the Content Security
Policy.directive expression
webapps-cspolicy remove removes the
specified directive from the Content Security Policy. If the directive has not been
previously configured, the command does not return an error.directive
webapps-cspolicy list lists the current Content Security Policy
directives and their associated values.
webapps-cspolicy [--version | -v] returns the version of
MATLAB®
Web App Server™ installed.
webapps-cspolicy [--help | -h] returns command-line help.
Examples
Input Arguments
Tips
Security Considerations: When the server is configured to
use MATLAB Runtime versions earlier than R2023b, the unsafe-inline attribute is
included in the script-src directive of the server's Content Security
Policy and cannot be removed. The attribute allows inline JavaScript execution and event handlers contained within a web app to execute on the
server. To enable these runtimes, see webapps-runtime.
Version History
Introduced in R2024b