1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Finished off script CSP rules

- Added caching for custom html head parsing to add nonce.
- Also moved api docs page into web routes to prevent issues.
This commit is contained in:
Dan Brown
2021-09-04 13:57:04 +01:00
parent fd44e4ba74
commit 253f386f00
13 changed files with 248 additions and 93 deletions

View File

@ -1,5 +1,7 @@
@inject('headContent', 'BookStack\Theming\CustomHtmlHeadContentProvider')
@if(setting('app-custom-head') && \Route::currentRouteName() !== 'settings')
<!-- Custom user content -->
{!! \BookStack\Util\HtmlNonceApplicator::apply(setting('app-custom-head'), $cspNonce) !!}
{!! $headContent->forWeb() !!}
<!-- End custom user content -->
@endif