Fehler: CSP und eure Erweiterung
Produkt: Antispam Contao
Moin,
bin hier gerade auf ein Problem beim Aktivieren von CSP im Startpunkt der Website und dem Einsatz eurer Erweiterung 'AntiSpam' gestoßen.
Dort wird ein Fehler erzeugt, bzw. die Scripte blockiert. Habe das jetzt hier gelöst und wollte euch meinen Weg nur mal durchgeben, eventuell könnt ihr kja beim nächsten Update das korrigieren.
- In dem Template 'form_rocksolid_antispam.html5' habe ich das Inline-CSS entfernt und über eine Klasse das Element ausgeblendet. - In 'vendor/madeyourday/contao-rocksolid-antispam/src/Form/AntispamField.php' habe ich in Zeile 161 laut Contao-Dokumentation folgendes beim Script-Tag eingefügt: '$this->attr()->setIfExists('nonce', $this->nonce('script-src'))' Nun funktioniert es auch bei aktiviertem CSP
Hoffe das ist hilfreich.
Gruß
Karsten
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by RockSolid Theme... on 06 Feb, 2026 03:25 PM
Vielen Dank für Ihre Nachricht.
Wir werden den CSP-Support im nächsten Update der Erweiterung prüfen und entsprechend implementieren.