Bug 38365: Integrate CSP middleware into Plack apps
Add Koha::Middleware::ContentSecurityPolicy to the middleware chain in both app.psgi and the Debian plack.psgi template. Without this integration, the CSP feature would not work - the middleware was created but never activated. This adds it to: - app.psgi (development/git install) - debian/templates/plack.psgi (opac, intranet, and intranet_svc mounts) Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
4301202a2d
commit
47a28d62f9
1
app.psgi
1
app.psgi
|
|
@ -56,6 +56,7 @@ builder {
|
|||
enable 'ReverseProxy';
|
||||
enable '+Koha::Middleware::UserEnv';
|
||||
enable '+Koha::Middleware::SetEnv';
|
||||
enable '+Koha::Middleware::ContentSecurityPolicy';
|
||||
enable '+Koha::Middleware::RealIP';
|
||||
|
||||
sub {
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ builder {
|
|||
enable 'LogWarn';
|
||||
}
|
||||
enable "+Koha::Middleware::CSRF";
|
||||
enable '+Koha::Middleware::ContentSecurityPolicy';
|
||||
$opac;
|
||||
};
|
||||
mount '/intranet' => builder {
|
||||
|
|
@ -119,6 +120,7 @@ builder {
|
|||
enable 'LogWarn';
|
||||
}
|
||||
enable "+Koha::Middleware::CSRF";
|
||||
enable '+Koha::Middleware::ContentSecurityPolicy';
|
||||
$intranet;
|
||||
};
|
||||
mount '/intranet_svc' => builder {
|
||||
|
|
@ -127,6 +129,7 @@ builder {
|
|||
enable 'LogWarn';
|
||||
}
|
||||
enable "+Koha::Middleware::CSRF";
|
||||
enable '+Koha::Middleware::ContentSecurityPolicy';
|
||||
$intranet_svc;
|
||||
};
|
||||
mount '/api/v1/app.pl' => builder {
|
||||
|
|
|
|||
Loading…
Reference in New Issue