首页 > 解决方案 > 我怎么知道我是否面临 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 错误而抱怨。我的问题是,我怎么知道,为什么我会遇到“拒绝访问”错误?

标签: httphttpbackend

解决方案


推荐阅读