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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Feb 2018 17:53:43 +0000 (14:53 -0300)
commitd77d371c4fe679c416554806da0d1c94ec06bc02
tree7d1a5ab85d16cf3efa2ecc3a5818d3a5ff30ed51
parentbb98e99dc6349ba316889e2123f6218d42863fc7
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>
Koha/REST/V1.pm