oveleon / contao-cookiebar

Cookie bar for the Contao Open Source CMS
GNU Affero General Public License v3.0
58 stars 24 forks source link

Adding CSP - Rework Cookiebar initialization to GeneratePageListener #191

Closed zoglo closed 6 months ago

zoglo commented 6 months ago

This PR addresses #190 due to not being able to get the CSP nonce within the KernelRequest (as it's way too early).

Changes

xprojects-de commented 6 months ago

I think the implemntation is basically good, but I think re-parsing the fe_page template is less good. In addition to the performance, the parseHook is also called again.

Furthermore the implementation depends on the sections and positions in the fe_page template not being removed. Also it depends on RegularPages and is not valid for other PageTypes like errorPage, etc.

zoglo commented 6 months ago

Error pages still extend from Pageregular so there wouldn't be any problem here.

zoglo commented 6 months ago

Closed in favor of #192