Comments (7)
可以提供支持,你有相关资料的链接或直接提供示例么?
from go-fastdfs.
意思就是当HTTP Method是OPTIONS的时候,Http Response Header里面要有
Access-Control-Allow-Origin: *,这时候不需要处理任何body,只需要设置Http Response Header就行
参考请求如下
Request URL: http://192.168.3.23:33310/upload
Request Method: OPTIONS
如果是Java Spring Web为参考的话,一般会设置跨域或者是写一个web filter处理所有OPTIONS请求,并直接设置Http Response Header并返回
registry.addMapping("/**").allowedOrigins("*").allowedMethods("GET", "POST", "DELETE");
参考资料https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
from go-fastdfs.
现在浏览器会提示错误如下:
Access to XMLHttpRequest at 'http://192.168.3.23:33310/upload' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
from go-fastdfs.
可以加微信,我编译一个包给你试一下,看看可不可以
from go-fastdfs.
好的,马上加你
from go-fastdfs.
下一版本支持。
from go-fastdfs.
请问现在的版本支持跨域了吗
from go-fastdfs.
Related Issues (20)
- 大文件断点续传和普通上传的自定义验证方式返回结果校验逻辑不统一 HOT 1
- log文件切分问题
- 文件同步问题 HOT 1
- 基于文档中Dockerfile构建镜像无法正常运行 HOT 1
- 跨域问题 HOT 1
- 断点下载配置问题 HOT 2
- 服务器断点下载问题 HOT 1
- 大文件路径转换问题 HOT 1
- 动态加载配置文件失败 HOT 3
- 文件名相同,文件内容不同,文件名前面自动加数字 HOT 1
- 文件名相同,文件内容不同,文件名前面自动加数字
- 上传文件后返回domain中不包含端口 HOT 1
- 请问google验证,获取到的验证码 是多久失效?还是说用多少次失效?在哪里配置失效时间 HOT 1
- 使用uppy tus 上传大文件时,分片文件上传未带端口
- 部署了fileserver无法从同一局域网下的其他IP访问服务器下载文件 HOT 1
- 它能做到,上传图片后,通过图片连接即可在一些web或者程序里显示出图片吗 HOT 1
- 安卓断点续传 HOT 2
- tmp下的文件恢复 HOT 3
- 老师,请问可以使集群上传的文件的Lastmodify保持一致吗? HOT 1
- tmp目录在服务重启后会有默认处理吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-fastdfs.