当前位置:网站首页>webapi接口文件下载时跨域问题
webapi接口文件下载时跨域问题
2022-07-29 07:25:00 【wtnu200】
使用Microsoft.AspNet.WebApi.Core可以解决普通接口的跨域,但如果接口功能是下载文件,像我的Webapi添加了下载pdf接口,不管客户端怎么调用,都会有提示跨域,目前在解决方法是在此接口加上
response.AddHeader("Access-Control-Allow-Origin", "*");
就可以解决问题
边栏推荐
- 美智光电IPO被终止:年营收9.26亿 何享健为实控人
- [daily question in summer] Luogu p6408 [coci2008-2009 3] pet
- PAT甲级 1146 拓扑顺序
- Paper reading (62):pointer networks
- zip gzip tar压缩进阶版
- 梳理市面上的2大NFT定价范式和4种解决方案
- What are the answers about older bloggers?
- [summer daily question] Luogu P6500 [coci2010-2011 3] zbroj
- Round avatar of user list and follow small blocks
- RoBERTa:A Robustly Optimized BERT Pretraining Approach
猜你喜欢

Use of gcc/g++

Some learning and understanding of vintage analysis

分析25个主要DeFi协议的路线图 预见DeFi未来的七大趋势

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

SEGGER 的硬件异常 分析

在线问题反馈模块实战(十七):实现excel模板在线下载功能

NFT 的 10 种实际用途

Spingboot integrates the quartz framework to realize dynamic scheduled tasks (support real-time addition, deletion, modification and query tasks)
Scala higher order (10): exception handling in Scala

QT专题:基础部件(按钮类,布局类,输出类,输入类,容器类)
随机推荐
能在SQL 语句中 指定 内存参数吗?
【暑期每日一题】洛谷 P6500 [COCI2010-2011#3] ZBROJ
Introduction to logback filter
Prometheus and grafana
电子元器件贸易企业如何借助ERP系统,解决仓库管理难题?
logback简介及引入方法
[MySQL] - [subquery]
log4qt内存泄露问题,heob内存检测工具的使用
Zabbix 其他基础监控项
【暑期每日一题】洛谷 P6320 [COCI2006-2007#4] SIBICE
亚马逊云助手小程序来啦!
分析25个主要DeFi协议的路线图 预见DeFi未来的七大趋势
Job 7.28 file IO and standard IO
性能更佳、使用更简单的懒加载IntersectionObserverEntry(观察者)
【FPGA教程案例42】图像案例2——通过verilog实现图像二值化处理,通过MATLAB进行辅助验证
QT basic day 2 (2) QT basic components: button class, layout class, output class, input class, container and other individual examples
Scala 高阶(十):Scala中的异常处理
log4j Layout简介说明
7-2 calculate the area and perimeter of a regular pentagon (25 points)
[summer daily question] Luogu p4413 [coci2006-2007 2] R2