本帖最后由 garyvalue 于 2024-2-20 21:55 编辑
好的 感谢
另外再咨询 一个报错 使用的是cloudflare r2存储
发帖时上传图片
- Access to XMLHttpRequest at 'https://***.r2.cloudflarestorage.com/' from origin 'https://***.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
复制代码- POST https://***.r2.cloudflarestorage.com/ net::ERR_FAILED 400 (Bad Request)
复制代码
但我已经在cloudflare 后台设置了CORS策略如下
- [
- {
- "AllowedOrigins": [
- "*"
- ],
- "AllowedMethods": [
- "GET",
- "PUT",
- "POST"
- ],
- "AllowedHeaders": [
- "*"
- ]
- }
- ]
复制代码 请问还需要做什么处理呢
|