diff options
Diffstat (limited to 'files/zh-cn/web/http')
| -rw-r--r-- | files/zh-cn/web/http/cors/errors/cors错误允许凭证/index.html | 6 | ||||
| -rw-r--r-- | files/zh-cn/web/http/headers/access-control-allow-headers/index.html | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/http/cors/errors/cors错误允许凭证/index.html b/files/zh-cn/web/http/cors/errors/cors错误允许凭证/index.html index 9ba1f6b468..8a8f8d0074 100644 --- a/files/zh-cn/web/http/cors/errors/cors错误允许凭证/index.html +++ b/files/zh-cn/web/http/cors/errors/cors错误允许凭证/index.html @@ -16,9 +16,9 @@ translation_of: Web/HTTP/CORS/Errors/CORSMIssingAllowCredentials <p>想要在客户端解决此问题,请修改代码以不请求使用凭据:</p> <ul> - <li>如果要使用{{domxref(“ XMLHttpRequest”)}}发出请求,请确保没有将{{domxref(“ XMLHttpRequest.withCredentials”,“ withCredentials”)}}}设置为true。</li> - <li>如果使用 <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/Server-sent_events">Server-sent events</a>,请确保{{domxref(“ EventSource.withCredentials”)}}为false(default)。</li> - <li>如果使用 <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a>,请确保{{domxref(“ Request.credentials”)}}为“omit”。</li> + <li>如果要使用{{domxref("XMLHttpRequest")}}发出请求,请确保没有将{{domxref("XMLHttpRequest.withCredentials”,“ withCredentials")}}}设置为true。</li> + <li>如果使用 <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/Server-sent_events">Server-sent events</a>,请确保{{domxref("EventSource.withCredentials")}}为false(default)。</li> + <li>如果使用 <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a>,请确保{{domxref("Request.credentials")}}为“omit”。</li> </ul> <p>想要通过更改服务器的配置来消除此错误,请调整服务器的配置以将Access-Control-Allow-Credentials标头的值设置为true。</p> diff --git a/files/zh-cn/web/http/headers/access-control-allow-headers/index.html b/files/zh-cn/web/http/headers/access-control-allow-headers/index.html index d6a3737780..b8b9214a39 100644 --- a/files/zh-cn/web/http/headers/access-control-allow-headers/index.html +++ b/files/zh-cn/web/http/headers/access-control-allow-headers/index.html @@ -46,7 +46,7 @@ Access-Control-Allow-Headers: *</pre> <p><strong><code>*</code> (wildcard)</strong></p> -<p>对于没有凭据的请求(没有HTTP cookie或HTTP认证信息的请求),值“ <code>*</code>”仅作为特殊的通配符值。 在具有凭据的请求中,它被视为没有特殊语义的文字标头名称“ *”。 请注意,{{HTTPHeader(“ Authorization”)}}标头不能使用通配符,并且始终需要明确列出。</p> +<p>对于没有凭据的请求(没有HTTP cookie或HTTP认证信息的请求),值“ <code>*</code>”仅作为特殊的通配符值。 在具有凭据的请求中,它被视为没有特殊语义的文字标头名称“ *”。 请注意,{{HTTPHeader("Authorization")}}标头不能使用通配符,并且始终需要明确列出。</p> <h2 id="示例">示例</h2> |
