|
@@ -1714,7 +1714,10 @@ begin
|
|
|
Conn.OnLog:[email protected];
|
|
|
end;
|
|
|
if (rdoHandleCORS in DispatchOptions) then
|
|
|
+ begin
|
|
|
IO.Response.SetCustomHeader('Access-Control-Allow-Origin',ResolvedCORSAllowedOrigins(IO.Request));
|
|
|
+ IO.Response.SetCustomHeader('Access-Control-Allow-Credentials',BoolToStr(CORSAllowCredentials,'true','false'));
|
|
|
+ end;
|
|
|
if not AuthenticateRequest(IO,True) then
|
|
|
exit;
|
|
|
if Not CheckResourceAccess(IO) then
|
|
@@ -2008,7 +2011,7 @@ begin
|
|
|
IO.RestOutput.InitStreaming;
|
|
|
IO.RestInput.InitStreaming;
|
|
|
IO.OnSQLLog:[email protected];
|
|
|
- if AuthenticateRequest(IO,False) then
|
|
|
+ if SameText('OPTIONS',aRequest.Method) or AuthenticateRequest(IO,False) then
|
|
|
DoHandleRequest(IO)
|
|
|
except
|
|
|
On E : Exception do
|