Skip to content
Navigation Menu
Toggle navigation
Sign in
Product
Actions
Automate any workflow
Packages
Host and manage packages
Security
Find and fix vulnerabilities
Codespaces
Instant dev environments
GitHub Copilot
Write better code with AI
Code review
Manage code changes
Issues
Plan and track work
Discussions
Collaborate outside of code
Explore
All features
Documentation
GitHub Skills
Blog
Solutions
By size
Enterprise
Teams
Startups
By industry
Healthcare
Financial services
Manufacturing
By use case
CI/CD & Automation
DevOps
DevSecOps
Resources
Topics
AI
DevOps
Innersource
Open Source
Security
Software Development
Explore
Learning Pathways
White papers, Ebooks, Webinars
Customer Stories
Partners
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
Enterprise platform
AI-powered developer platform
Available add-ons
Advanced Security
Enterprise-grade security features
GitHub Copilot
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search syntax tips
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mdn
/
translated-content
Public
Notifications
You must be signed in to change notification settings
Fork
8k
Star
1.7k
Code
Issues
157
Pull requests
197
Actions
Projects
7
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Files
main
Breadcrumbs
translated-content
/
files
/
zh-cn
/
web
/
http
/
cors
/
errors
/
corsdidnotsucceed
/
index.md
Blame
Blame
Latest commit
History
History
31 lines (21 loc) · 1.16 KB
main
Breadcrumbs
translated-content
/
files
/
zh-cn
/
web
/
http
/
cors
/
errors
/
corsdidnotsucceed
/
index.md
Top
File metadata and controls
Preview
Code
Blame
31 lines (21 loc) · 1.16 KB
Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
title
:
原因:CORS request did not succeed
slug
:
Web/HTTP/CORS/Errors/CORSDidNotSucceed
---
{{HTTPSidebar}}
##
原因
```
plain
原因:CORS request did not succeed
```
##
哪里错了?
使用 CORS 的 {{Glossary("HTTP")}} 请求失败,因为 HTTP 连接在网络或协议级别失败。该错误与 CORS 没有直接关系,而是某种基本的网络错误。
很多情况下,它是某个浏览器插件(比如广告拦截或隐私保护插件)阻止了请求而引起的。
其他可能包括的原因:
-
尝试访问拥有无效凭证的
`
https
`
资源将导致此错误。
-
尝试从
`
https
`
源页面访问
`
http
`
资源将也会导致此错误。
-
从 Firefox 68 开始,
`
https
`
页面不允许去访问
`
http://localhost
`
,尽管这可能随着
[
Bug 1488740
]
(
https://bugzil.la/1488740
)
而改变。
-
服务器不能响应真实的请求(即使它响应了{{Glossary("Preflight request","预检请求")}})。一种情况是正在开发的 HTTP 服务器发生异常停止,而且没有返回任何数据。
##
参见
-
[
CORS 错误
]
(
/zh-CN/docs/Web/HTTP/CORS/Errors
)
-
术语:{{Glossary("CORS")}}
-
[
CORS 介绍
]
(
/zh-CN/docs/Web/HTTP/CORS
)
You can’t perform that action at this time.