IdHTTPServer允许跨域访问
procedure TMain.idHttpServerCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo;
AResponseInfo: TIdHTTPResponseInfo);
begin
AResponseInfo.CustomHeaders.Add('Access-Control-Allow-Origin:*');
AResponseInfo.CustomHeaders.Add('Access-Control-Allow-Headers:*');
AResponseInfo.CustomHeaders.Add('Access-Control-Allow-Method:*');
end;
转载于:https://www.cnblogs.com/hnxxcxg/p/11262024.html
相关资源:Delphi HttpServer跨域