Pure ToolsPure Tools
ToolsSitemapGitHubReport Issue中文

© 2026 Pure Tools. Crafted with precision.

Privacy

Free Online CORS Checker - ATools

Free online CORS checker: enter URL, method, headers and body to predict preflight and get common fixes for CORS errors.

Edit this tool
Free online CORS checker by ATools: enter an API URL, HTTP method, request headers and body to predict whether the browser will trigger an OPTIONS preflight request, and get actionable fix suggestions for common CORS failures (missing Access-Control-Allow-Origin, methods/headers mismatch, credentials with wildcard origin, and more). Runs fully in-browser; no data is uploaded.
请求
请求头(每行一条:Key: Value)
请求体
分析
Origin: - → https://httpbin.org
是否会触发预检(OPTIONS): 会(需要服务端正确响应 OPTIONS)
触发原因
  • 包含非简单请求头:content-type。
建议允许的方法(Allow-Methods)
POST
建议允许的请求头(Allow-Headers)
content-type
示例配置/响应头
解决建议
  • 跨域请求的 CORS 只能由服务端响应头决定,前端无法“绕过”。
  • 需要处理 OPTIONS 预检:对 OPTIONS 返回 204/200,并带上 Allow-Origin/Allow-Methods/Allow-Headers 等响应头。
  • 确保预检响应的 Access-Control-Allow-Headers 覆盖:content-type。
  • 确保预检响应的 Access-Control-Allow-Methods 包含:POST。
  • 浏览器在 CORS 失败时通常只显示 “TypeError: Failed to fetch”,具体原因请在 DevTools -> Network 查看 preflight / response headers。
实际请求结果
耗时:-
状态:-
响应
诊断
可从浏览器 DevTools -> Network 复制 response headers 或 preflight response headers,粘贴每行一条:Key: Value。
粘贴你看到的响应头(可选,用于更精确诊断)