IdHTTPServer允许跨域访问


本文整理自网络,侵删。

 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;

相关阅读 >>

Delphi判断某一个点是否在一个区域内

Delphi adoquery 开启本地缓存

Delphi 运行clsid文件

Delphi函数assignfile使用

Delphi 判断按键状态

Delphi 调试ios时出现 please specify exact device preset uuid

Delphi中strtodatetime函数tformatsettings参数的使用

Delphi生成随机字符串

Delphi tfdconnection只能取得50处理

Delphi xe5 android 开发实现手机打电话和发短信

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...