Bugzilla – Attachment 167611 Details for
Bug 37056
CSRF error on login when user js contains a fetch of svc/report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37056: Add app endpoint for OPAC SVC
Bug-37056-Add-app-endpoint-for-OPAC-SVC.patch (text/plain), 2.58 KB, created by
Nick Clemens (kidclamp)
on 2024-06-10 17:54:24 UTC
(
hide
)
Description:
Bug 37056: Add app endpoint for OPAC SVC
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-06-10 17:54:24 UTC
Size:
2.58 KB
patch
obsolete
>From 34c40bd62a903d5da93e152d8fdf54285f00776f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 10 Jun 2024 17:51:54 +0000 >Subject: [PATCH] Bug 37056: Add app endpoint for OPAC SVC > >I think this needs to happen on another bug, there are several scripts here that use templates for auth >as well as shelfbrowser.pl which does return rendered html - so maybe shouldn't be treated this way >--- > debian/templates/apache-shared-opac-plack.conf | 2 ++ > debian/templates/plack.psgi | 12 ++++++++++++ > 2 files changed, 14 insertions(+) > >diff --git a/debian/templates/apache-shared-opac-plack.conf b/debian/templates/apache-shared-opac-plack.conf >index 5d15a760234..dae4db08f58 100644 >--- a/debian/templates/apache-shared-opac-plack.conf >+++ b/debian/templates/apache-shared-opac-plack.conf >@@ -14,6 +14,8 @@ > RequestHeader set X-FORWARDED-PROTO "https" env=HTTPS > > #Â Point the OPAC site to Plack >+ ProxyPass /cgi-bin/koha/svc "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac_svc" >+ ProxyPassReverse /cgi-bin/koha/svc "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac_svc" > ProxyPass /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" > ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac" > ProxyPass /index.html "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac/opac-main.pl" >diff --git a/debian/templates/plack.psgi b/debian/templates/plack.psgi >index eff36bf3abb..cfa1f059259 100644 >--- a/debian/templates/plack.psgi >+++ b/debian/templates/plack.psgi >@@ -64,6 +64,10 @@ my $opac = Plack::App::CGIBin->new( > root => $ENV{DEV_INSTALL}? "$home/opac": "$home/opac/cgi-bin/opac" > )->to_app; > >+my $opac_svc = Plack::App::CGIBin->new( >+ root => $ENV{DEV_INSTALL}? "$home/opac/svc": "$home/opac/cgi-bin/opac/svc" >+)->to_app; >+ > my $apiv1 = builder { > my $server = Mojo::Server::PSGI->new; > $server->load_app("$home/api/v1/app.pl"); >@@ -129,6 +133,14 @@ builder { > enable "+Koha::Middleware::CSRF"; > $intranet_svc; > }; >+ mount '/opac_svc' => builder { >+ if ( Log::Log4perl->get_logger('plack-intranet')->has_appenders ){ >+ enable 'Log4perl', category => 'plack-intranet'; >+ enable 'LogWarn'; >+ } >+ enable "+Koha::Middleware::CSRF"; >+ $opac_svc; >+ }; > mount '/api/v1/app.pl' => builder { > if ( Log::Log4perl->get_logger('plack-api')->has_appenders ){ > enable 'Log4perl', category => 'plack-api'; >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37056
:
167580
|
167581
|
167610
|
167611
|
167617
|
167692
|
168342