<?xml version="1.0" encoding="UTF-8"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <section id="refilo_security" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
        <label>Security</label>
        <tab>refilo</tab>
        <resource>FiloBlu_Refilo::refilo_config</resource>
        <group id="csp" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" type="text">
            <label>Content Security Policy</label>
            <field id="enabled" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" type="select">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="report_only" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" type="select">
                <label>CSP Report Only</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="report_enabled" translate="label" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1" type="select">
                <label>Report enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="report_uri" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Report URI</label>
            </field>
            <field id="rules" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Predefined rules</label>
                <frontend_model>FiloBlu\Refilo\Block\Adminhtml\Form\Field\CspRules</frontend_model>
                <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
            </field>
            <field id="base_uri" translate="label" type="textarea" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: base-uri</label>
            </field>
            <field id="default_src" translate="label" type="textarea" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: default-src</label>
            </field>
            <field id="child_src" translate="label" type="textarea" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: child-src</label>
            </field>
            <field id="connect_src" translate="label" type="textarea" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: connect-src</label>
            </field>
            <field id="manifest_src" translate="label" type="textarea" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: manifest-src</label>
            </field>
            <field id="media_src" translate="label" type="textarea" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: media-src</label>
            </field>
            <field id="object_src" translate="label" type="textarea" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: object-src</label>
            </field>
            <field id="style_src" translate="label" type="textarea" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: style-src</label>
            </field>
            <field id="script_src" translate="label" type="textarea" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: script-src</label>
            </field>
            <field id="img_src" translate="label" type="textarea" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: img-src</label>
            </field>
            <field id="frame_src" translate="label" type="textarea" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: frame-src</label>
            </field>
            <field id="frame_ancestors" translate="label" type="textarea" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: frame-ancestors</label>
            </field>
            <field id="form_action" translate="label" type="textarea" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: form-action</label>
            </field>
            <field id="font_src" translate="label" type="textarea" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom rules: font-src</label>
            </field>
        </group>
    </section>
</include>
