dev

Forked from tuleap/dev

Clone or download

Read-only

request #7841: Pagination headers cannot be read in CORS request

On non-CORS requests, all headers are available through XMLHttpRequest. However, when doing a CORS request, by default only simple response headers are readable with XMLHttpRequest (Content-Type, Last-modified, Content-Language, Cache-Control, Expires, Pragma). As X-PAGINATION-SIZE is obviously not part of the simple response headers list, we need to enable it by using the Access-Control-Expose-Headers: Access-Control-Expose-Headers: X-PAGINATION-SIZE This blocks people to build tools based on Tuleap REST API. References: http://www.w3.org/TR/cors/#terminology http://www.w3.org/TR/cors/#access-control-expose-headers-response-header https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Expose-Headers Change-Id: I03d739baed0d991e83fb8372d1f970970e50c524

Modified Files

Name
M src/www/api/.htaccess +1 −0 Go to diff View file