http - 我怎么知道我是否面临 CORS 错误?
问题描述
我正在向端点发送 http 请求,作为响应,我收到以下错误。我确信,为了收到正确的响应,我不需要登录或任何身份验证。但是,BE 抱怨此消息:
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title> 403 Forbidden
</title></head>
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">403</h1>
<h2 style="margin-top:20px;font-size: 30px;">Forbidden
</h2>
<p>Access to this resource on the server is denied!</p>
</div></div></body></html>
在我看来,唯一可能的情况是,它因为 CORS 错误而抱怨。我的问题是,我怎么知道,为什么我会遇到“拒绝访问”错误?
解决方案
推荐阅读
- java - 如何将对象转换为仅在运行时已知的类型?
- c# - 第二次点击后页面是否刷新?
- mysql - 如何使用 MySQL 子查询和 GROUP BY
- android - Delphi 通过 AIDL 连接打印服务
- ruby-on-rails - 查找数组的每个子数组包含的值
- python-3.x - 将输入字符串分成两个偶数部分或长度为奇数时,将中间字符留在第一部分。(仅布尔值)
- c++ - 运行简单的 .oct 文件时 Octave 崩溃,我的代码有什么问题?
- .net - 图像出现在预览中,但在我启动程序时不会出现
- javascript - 如何绑定以 url 表示的 api 数据?
- haskell - 有没有办法在 Haskell 的 main 之外接收 IO?