We had a third-party hitting the ILS-DI API and in the logs it said 200, but they were actually getting the "Unauthorized IP address" message. It seems to me that we should have the ILS-DI API reply with 403 in that situation, so that Koha sysadmins can see that the requests are failing. This could also be useful for security monitoring.
Ah right... we can't do that without changing Apache because otherwise it'll use the the generic Koha HTML 403 error document...
(In reply to David Cook from comment #1) > Ah right... we can't do that without changing Apache because otherwise it'll > use the the generic Koha HTML 403 error document... This is something I bumped into at https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=31982&attachment=142662
Actually this one is harder because the error message is coming from the ErrorDocument Plack Middleware and not Apache...
So I think this might be impossible without removing Plack::Middleware::ErrorDocument or mounting ilsdi.pl as its own Plack app. The latter could be doable using the following: my $ilsdi_app = Plack::App::WrapCGI->new(script => "/path/to/script.pl")->to_app; mount '/opac/ilsdi.pl' => $ilsdi_app; Plack::App::WrapCGI is what's used under the hood by Plack::App::CGIBin. The path to script would depend on whether or not it's a DEV_INSTALL, but it would be doable. -- But it might not be worth it just to get better HTTP codes...