In this article
哪里错了?
发送了一个需要使用CORS 的请求,但在用户的浏览器中禁用了 CORS。发生这种情况时,用户需要在浏览器中重新打开 CORS。
在 Firefox 中,禁用 CORS 的首选项是content.cors.disable
。将此设置为true
将禁用 CORS,因此在这种情况下,CORS 请求将始终因此错误而失败。
发送了一个需要使用CORS 的请求,但在用户的浏览器中禁用了 CORS。发生这种情况时,用户需要在浏览器中重新打开 CORS。
在 Firefox 中,禁用 CORS 的首选项是content.cors.disable
。将此设置为true
将禁用 CORS,因此在这种情况下,CORS 请求将始终因此错误而失败。
原因:CORS disabled
原因:CORS header 'Access-Control-Allow-Origin' does not match 'xyz'
原因:CORS header 'Access-Control-Allow-Origin' missing
原因:CORS header 'Origin' cannot be added
原因:CORS preflight channel did not succeed
原因:CORS request did not succeed
原因:CORS request external redirect not allowed
原因:CORS request not HTTP
原因:Credential is not supported if the CORS header 'Access-Control-Allow-Origin' is '*'
原因:Did not find method in CORS header 'Access-Control-Allow-Methods'
原因:expected 'true' in CORS header 'Access-Control-Allow-Credentials'
原因:invalid token 'xyz' in CORS header 'Access-Control-Allow-Headers'
原因:invalid token 'xyz' in CORS header 'Access-Control-Allow-Methods'
原因:missing token 'xyz' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel
原因:Multiple CORS header 'Access-Control-Allow-Origin' not allowed
Accept
Accept-CH
Accept-Encoding
Accept-Language
Accept-Patch
Accept-Post
Accept-Ranges
Access-Control-Allow-Credentials
Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Access-Control-Expose-Headers
Access-Control-Max-Age
Access-Control-Request-Headers
Access-Control-Request-Method
Age
Allow
Alt-Svc
Alt-Used
Attribution-Reporting-Eligible
实验性Attribution-Reporting-Register-Source
实验性Attribution-Reporting-Register-Trigger
实验性Authorization
Available-Dictionary
实验性Cache-Control
Clear-Site-Data
Connection
Content-Digest
Content-Disposition
Content-DPR
非标准已弃用Content-Encoding
Content-Language
Content-Length
Content-Location
Content-Range
Content-Security-Policy (CSP)
Content-Security-Policy-Report-Only
Content-Type
Cookie
Critical-CH
实验性Cross-Origin-Embedder-Policy
Cross-Origin-Opener-Policy
Cross-Origin-Resource-Policy
Date
Device-Memory
Dictionary-ID
实验性DNT
非标准已弃用Downlink
实验性DPR
非标准已弃用Early-Data
实验性ECT
实验性ETag
Expect
Expect-CT
已弃用Expires
Forwarded
From
Host
If-Match
If-Modified-Since
If-None-Match
If-Range
If-Unmodified-Since
Integrity-Policy
实验性Integrity-Policy-Report-Only
实验性Keep-Alive
Last-Modified
Link
Location
Max-Forwards
NEL
实验性No-Vary-Search
实验性Observe-Browsing-Topics
实验性非标准Origin
Origin-Agent-Cluster
Permissions-Policy
实验性Pragma
已弃用Prefer
Preference-Applied
Priority
Proxy-Authenticate
Proxy-Authorization
Range
Referer
Referrer-Policy
Refresh
Report-To
非标准已弃用Reporting-Endpoints
Repr-Digest
Retry-After
RTT
实验性Save-Data
实验性Sec-Browsing-Topics
实验性非标准Sec-CH-Prefers-Color-Scheme
实验性Sec-CH-Prefers-Reduced-Motion
实验性Sec-CH-Prefers-Reduced-Transparency
实验性Sec-CH-UA
实验性Sec-CH-UA-Arch
实验性Sec-CH-UA-Bitness
实验性Sec-CH-UA-Form-Factors
实验性Sec-CH-UA-Full-Version
已弃用Sec-CH-UA-Full-Version-List
实验性Sec-CH-UA-Mobile
实验性Sec-CH-UA-Model
实验性Sec-CH-UA-Platform
实验性Sec-CH-UA-Platform-Version
实验性Sec-CH-UA-WoW64
实验性Sec-Fetch-Dest
Sec-Fetch-Mode
Sec-Fetch-Site
Sec-Fetch-User
Sec-GPC
实验性Sec-Purpose
Sec-Speculation-Tags
实验性Sec-WebSocket-Accept
Sec-WebSocket-Extensions
Sec-WebSocket-Key
Sec-WebSocket-Protocol
Sec-WebSocket-Version
Server
Server-Timing
Service-Worker
Service-Worker-Allowed
Service-Worker-Navigation-Preload
Set-Cookie
Set-Login
SourceMap
Speculation-Rules
实验性Strict-Transport-Security
Supports-Loading-Mode
实验性TE
Timing-Allow-Origin
Tk
非标准已弃用Trailer
Transfer-Encoding
Upgrade
Upgrade-Insecure-Requests
Use-As-Dictionary
实验性User-Agent
Vary
Via
Viewport-Width
非标准已弃用Want-Content-Digest
Want-Repr-Digest
Warning
已弃用Width
非标准已弃用WWW-Authenticate
X-Content-Type-Options
X-DNS-Prefetch-Control
非标准X-Forwarded-For
非标准X-Forwarded-Host
非标准X-Forwarded-Proto
非标准X-Frame-Options
X-Permitted-Cross-Domain-Policies
非标准X-Powered-By
非标准X-Robots-Tag
非标准X-XSS-Protection
非标准已弃用100 Continue
101 Switching Protocols
102 Processing
103 Early Hints
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
208 Already Reported
226 IM Used
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
307 Temporary Redirect
308 Permanent Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Content Too Large
414 URI Too Long
415 Unsupported Media Type
416 Range Not Satisfiable
417 Expectation Failed
418 I'm a teapot
421 Misdirected Request
422 Unprocessable Entity
423 Locked
424 Failed Dependency
425 Too Early
426 Upgrade Required
428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
510 Not Extended
511 Network Authentication Required
CSP: base-uri
CSP: block-all-mixed-content
已弃用CSP: child-src
CSP: connect-src
CSP:default-src
fenced-frame-src
实验性CSP: font-src
CSP: form-action
CSP:frame-ancestors
frame-src
img-src
manifest-src
media-src
object-src
prefetch-src
非标准已弃用report-to
report-uri
已弃用require-trusted-types-for
CSP: sandbox
script-src
script-src-attr
CSP: script-src-elem
style-src
style-src-attr
style-src-elem
trusted-types
CSP: upgrade-insecure-requests
CSP: worker-src
Permissions-Policy: accelerometer
实验性Permissions-Policy: ambient-light-sensor
实验性aria-notify
实验性非标准Permissions-Policy: attribution-reporting
实验性Permissions-Policy: autoplay
实验性Permissions-Policy: bluetooth
实验性browsing-topics
实验性非标准Permissions-Policy: camera
实验性captured-surface-control
实验性compute-pressure
实验性cross-origin-isolated
实验性deferred-fetch
实验性deferred-fetch-minimal
实验性display-capture
实验性encrypted-media
实验性Permissions-Policy: fullscreen
实验性gamepad
实验性geolocation
实验性gyroscope
实验性hid
实验性identity-credentials-get
实验性idle-detection
实验性language-detector
实验性Permissions-Policy: local-fonts
实验性magnetometer
实验性microphone
实验性midi
实验性on-device-speech-recognition
实验性otp-credentials
实验性payment
实验性Permissions-Policy: picture-in-picture
实验性publickey-credentials-create
实验性publickey-credentials-get
实验性screen-wake-lock
实验性serial
实验性speaker-selection
实验性storage-access
实验性summarizer
实验性translator
实验性usb
实验性Permissions-Policy: web-share
实验性window-management
实验性xr-spatial-tracking
实验性