[Koha-bugs] [Bug 24369] Add ability to set CORS header in Koha
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Mar 4 19:41:28 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24369
--- Comment #10 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 100146
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100146&action=edit
Bug 24369: Add CORS support to the API
This patch adds CORS support for API requests. It uses the
AccessControlAllowOrigin syspref. To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/auth.t
=> SUCCESS: Tests pass!
3. Set the AccessControlAllowOrigin to any string (for example, *)
4. Use any API testing tool (Postman?) to place a request on the API
=> SUCCESS: The response headers include Access-Control-Allow-Origin,
containing what you set on the syspref
5. Sign off :-D
Signed-off-by: Andrew Isherwood <andrew.isherwood at ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list