]> git.koha-community.org Git - koha.git/commit
Bug 20134: Remove /api/v1/app.pl from the generated URLs
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 5 Feb 2018 13:28:37 +0000 (10:28 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 16 Feb 2018 01:29:15 +0000 (01:29 +0000)
commit31727730297037013f7ad65db971f15cdead26f8
treef0331f02189b359b9361630626418a88fa1d4fde
parent002ec257b0a3ded0742d7834b889a915a7328dec
Bug 20134: Remove /api/v1/app.pl from the generated URLs

This patch removes the /api/v1/app.pl prefix from generated baseUrl.
It has the consequence of hardcoding / as the base path for the API.

This is ok because we don't currently support mounting Koha pieces in
different than hardcoded paths (/cgi-bin/koha?), but certainly worth
mentioning because this will need to depend on a syspref or config entry
when someone chages this behviour.

To test:
- On master, point your browser to:
  http://kohadev.mydnsname.org:8080/api/v1/
=> FAIL: basePath looks like /api/v1/app.pl/api/v1
- Apply this patch
- Restart memcached and plack:
  $ restart_all
or
  $ sudo systemctl restart memcached && sudo systemctl restart
  koha-common
- Reload http://kohadev.mydnsname.org:8080/api/v1/
=> SUCCESS: basePath is /api/v1
- Sign off :-D

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/REST/V1.pm