Hi,
Is it possible to append the Request Header for the OPTIONS Request Method that happens during the Upload Sequence?
I have done the following, however, it does not affect the OPTIONS request.
1.
uploadEventHandler(e: UploadEvent) {
2.
e.headers.set(
'Access-Control-Request-Headers'
,
'authorization'
);
3.
e.headers.append(
'Authorization'
,
'Bearer '
+ abp.auth.getToken());
4.
}
Basically, on the initial request for OPTIONS, I need to append "Access-Control-Request-Headers: authorization"
Thanks!
Background: I'm using another file control currently that is working well, however I am transitioning everything over to Kendo. When I try to replace the control with the Kendo Upload, I get the following. Tech is Angular, ASP.NET CORE (ABP actually)
Failed to load http://localhost:22742/File/UploadFiles: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:4200' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.