Dear players,
With these CORS filter configuration:
play.filters.cors {
# allow all paths
pathPrefixes = ["/"]
# allow all origins
allowedOrigins = null
# allow the methods Variant uses.
allowedHttpMethods = ["GET", "POST", "PUT", "DELETE"]
# allow all headers
allowedHttpHeaders = null
# Response headers which browsers will expose to JavaScript.
exposedHeaders = ["X-Connection-ID"]
}
I am not getting the "X-Connection-ID" custom header exposed to browser AJAX (tried FF and Chrome). Specifically, this jQuery code
$.ajax({
url: httpUrl,
method: "post",
contentType: "text/plain; charset=utf-8",
success: function (respBody, status, resp) {
console.dir(resp.getAllResponseHeaders());
}
});
only prints the Content-Type header.
Thanks in advance for your help.
—Igor Urisman.