当前位置:网站首页>Cross domain problems when downloading webapi interface files
Cross domain problems when downloading webapi interface files
2022-07-29 07:41:00 【wtnu200】
Use Microsoft.AspNet.WebApi.Core It can solve the cross domain problem of common interfaces , But if the interface function is to download files , Like mine Webapi Added Downloads pdf Interface , No matter how the client calls , There will be prompts across domains , At present, the solution is to add
response.AddHeader("Access-Control-Allow-Origin", "*");
You can solve the problem
边栏推荐
猜你喜欢

Analyze the roadmap of 25 major DFI protocols and predict the seven major trends in the future of DFI

【无标题】格式保存

halcon的安装以及在vs2017中测试,vs2017中dll的配置

Thinkphp6 realizes database backup

SEGGER 的硬件异常 分析

Meizhi optoelectronics' IPO was terminated: annual revenue of 926million he Xiangjian was the actual controller

【WPF】通过动态/静态资源实现语言切换

Prometheus与Grafana

QT连接两个qslite数据库报错QSqlQuery::exec: database not open

cs61abc分享会(六)程序的输入输出详解 - 标准输入输出,文件,设备,EOF,命令行参数
随机推荐
Sqlmap(SQL注入自动化工具)
Female graduate students do "mind mapping" and quarrel with their boyfriend! Netizen: the "king of infighting" in the quarrel
Prepare esp32 environment
信用卡购物积分
EF core reading text type is slow_ EF core is slow to read large string fields
智慧城市的应用挑战,昇腾AI给出了新解法
[summer daily question] Luogu p1601 a+b problem (high precision)
多线程购物
蓝桥杯A组选数异或
监听页面滚动位置定位底部按钮(包含页面初始化定位不对鼠标滑动生效的解决方案)
Using C language to skillfully realize the chess game -- Sanzi chess
Android interview question | how to write a good and fast log library?
2-unified return class dto object
stm32 操作W25Q256 W25Q16 spi flash
PAT甲级 1154 顶点着色
QT专题:基础部件(按钮类,布局类,输出类,输入类,容器类)
How much data can a single MySQL table store at most?
【暑期每日一题】洛谷 P1601 A+B Problem(高精)
UPC little C's King Canyon
Pat class a 1146 topology sequence