We have created a custom HTTPProvider, and we want it to use admin-digest authentication. It works great when using Postman to test it, But when the call is made from javascript in Chrome we get a cors problem. Chrome sends a preflight request and the Authorization header is not supported, and we want to add some custom headers to the request to filter the returned data (also cors not supported headers). So the question is whether it is possible to modify the preflight response that wowza sends to chrome and add new supported headers, or must we put all our authentication data and filters in the request URL?
Hi @Aleksandar Davkovski, try this
@Override
public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) {
// ...
resp.setHeader("Access-Control-Allow-Origin", "*");
// ...
}