Hi all,
With some recent code, I’ve been using creating self-referential URL in Koha using CGI->url(), and passing it as a value. With CGI, the URL is correct (ie starting with /cgi-bin/koha). With Plack, it’s not, because the OPAC is mounted as “/opac”.
I worked around this by rewriting the self-referential URL in my code, but I was wondering if anyone else had any thoughts on this.
I’ve noticed there are a few places in Koha where we use CGI->url() and I’m guessing we may have unexpected bugs in Plack-enabled Koha as a result.
Of course, one workaround would be to have /opac and /intranet aliases or URL rewriting in Apache, so that the self-referential URLs created by Plack still end up resolving. I wonder if that’s the easiest path forward.
In the past, I have wondered if we could get rid of “/cgi-bin/koha” as a path prefix all together (especially as cgi-bin scares security tools), but it’s so deeply embedded in Koha at this point that it seems a huge task to replace it.
Anyway, just throwing that out there.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Online: 02 8005 0595