[Bug 24384] New: Add Access-Control-Allow-Origin support to reports svc
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Bug ID: 24384 Summary: Add Access-Control-Allow-Origin support to reports svc Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Depends on| |24369 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24369 [Bug 24369] Add ability to set CORS header in Koha -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add |Add |Access-Control-Allow-Origin |Access-Control-Allow-Origin |support to reports svc |support to OPAC reports svc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 97095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97095&action=edit Bug 24384: Add Access-Control-Allow-Origin support to OPAC reports svc This patch makes the opac/svc/report script use output_with_http_headers so it sets the Access-Control-Allow-Origin header. To test: 1. Create a new public report and remember the report id 2. Use your favourite too to fetch the report in JSON by issuing: GET http://localhost:8080/cgi-bin/koha/svc/report?id=1 => FAIL: There is no Access-Control-Allow-Origin header 3. Apply this patch 4. Restart Plack $ sudo koha-plack --restart kohadev 5. Set the AccessControlAllowOrigin to anything (for example, https://koha-community.org) 6. Repeat 2 => SUCCESS: On the response headers you find Access-Control-Allow-Origin: https://koha-community.org 7. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |nick@bywatersolutions.com Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97095|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 100705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100705&action=edit Bug 24384: Add Access-Control-Allow-Origin support to OPAC reports svc This patch makes the opac/svc/report script use output_with_http_headers so it sets the Access-Control-Allow-Origin header. To test: 1. Create a new public report and remember the report id 2. Use your favourite too to fetch the report in JSON by issuing: GET http://localhost:8080/cgi-bin/koha/svc/report?id=1 => FAIL: There is no Access-Control-Allow-Origin header 3. Apply this patch 4. Restart Plack $ sudo koha-plack --restart kohadev 5. Set the AccessControlAllowOrigin to anything (for example, https://koha-community.org) 6. Repeat 2 => SUCCESS: On the response headers you find Access-Control-Allow-Origin: https://koha-community.org 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100705|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 100732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100732&action=edit Bug 24384: Add Access-Control-Allow-Origin support to OPAC reports svc This patch makes the opac/svc/report script use output_with_http_headers so it sets the Access-Control-Allow-Origin header. To test: 1. Create a new public report and remember the report id 2. Use your favourite too to fetch the report in JSON by issuing: GET http://localhost:8080/cgi-bin/koha/svc/report?id=1 => FAIL: There is no Access-Control-Allow-Origin header 3. Apply this patch 4. Restart Plack $ sudo koha-plack --restart kohadev 5. Set the AccessControlAllowOrigin to anything (for example, https://koha-community.org) 6. Repeat 2 => SUCCESS: On the response headers you find Access-Control-Allow-Origin: https://koha-community.org 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #5 from Joy Nelson <joy@bywatersolutions.com> --- not backported to 19.11.x due to dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24384 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Using the foundations laid release notes| |with bug 24369 this | |enhancement allows the CORS | |headers to be set on the | |OPAC Reports SVC routes. CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org