This allows the OpenSRF JavaScript client library (or
to be precise, one that has been modified to direct
requests at a different domain) to take advantage of CORS
support.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
apr_table_set(r->headers_out, "Access-Control-Allow-Origin", origin);
apr_table_set(r->headers_out, "Access-Control-Allow-Methods", "POST,OPTIONS");
apr_table_set(r->headers_out, "Access-Control-Allow-Headers", OSRF_HTTP_ALL_HEADERS);
+ apr_table_set(r->headers_out, "Access-Control-Expose-Headers", OSRF_HTTP_ALL_HEADERS);
osrfLogInfo(OSRF_LOG_MARK, "Set cross-origin headers for request from %s", origin);