Title: WP-CORS
Author: tstephenson
Published: <strong>2014 年 10 月 5 日</strong>
Last modified: 2023 年 7 月 28 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-cors.svg)

# WP-CORS

 作者：[tstephenson](https://profiles.wordpress.org/tstephenson/)

[下载](https://downloads.wordpress.org/plugin/wp-cors.0.2.2.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-cors/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-cors/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-cors/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-cors/#developers)

 [支持](https://wordpress.org/support/plugin/wp-cors/)

## 描述

My use case is to allow content authors to write help pages in WordPress.
 This 
content is fetched and embedded into a single page application hosted on another
domain.

AJAX requests to this site from another are typically disallowed by the browser’s
security model.
 To permit legitimate uses the requesting browser may include an
Origin header containing its domain. This plugin uses the Origin header to decide
whether to allow the request or not. Allowed domains can be specified in the plugin’s
Settings page.

## 屏幕截图

 * [[
 * The plugin’s Settings page.

## 安装

This section describes how to install the plugin and get it working.

 1. Upload the uncompressed contents of `wp-cors.zip` to the `/wp-content/plugins/`
    directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常见问题

### Why do I need this plugin?

If you want to integrate content from your site to JavaScript applications running
on other host domains (or allow other people to) then the CORS standard is a way
to allow this.

### What is the difference between CORS and JSONP?

CORS is more modern and more secure since it works _with_ the browser’s same-origin
policy and XmlHttpRequest objects rather than bypassing them.

### Ok I’m sold, where can I read more about CORS?

You can find the CORS spec here: http://www.w3.org/TR/cors/ You can learn more about
how to use CORS here: http://www.html5rocks.com/en/tutorials/cors/

### How do I control which sites can integrate using CORS?

This plugin’s Settings page allows administrators to specify a comma separated list
of allowed domains.

## 评价

![](https://secure.gravatar.com/avatar/50c101f4d9be877802d44713e653b7ee3306990c73a8daa836608bfa2bf2dcba?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work](https://wordpress.org/support/topic/doesnt-work-2425/)󠁿

 [angeljs](https://profiles.wordpress.org/angeljs/) 2020 年 5 月 28 日

Doesn’t work at all

![](https://secure.gravatar.com/avatar/fc79b304fae938687630ff147878c33fc258d96d9d2a6da6e0dc2bcad7e002ea?
s=60&d=retro&r=g)

### 󠀁[wp cores… allow access to this site using the CORS standard for authorizing cr](https://wordpress.org/support/topic/wp-cores-allow-access-to-this-site-using-the-cors-standard-for-authorizing-cr/)󠁿

 [nileshtaylor](https://profiles.wordpress.org/nileshtaylor/) 2018 年 7 月 30 日

its not working for me.. my website yet giving error cores origin error.

 [ 阅读所有3条评价 ](https://wordpress.org/support/plugin/wp-cors/reviews/)

## 贡献者及开发者

「WP-CORS」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ tstephenson ](https://profiles.wordpress.org/tstephenson/)

[帮助将「WP-CORS」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-cors)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-cors/)，查看[SVN仓库](https://plugins.svn.wordpress.org/wp-cors/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/wp-cors/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-cors/)。

## 更新日志

#### 0.2.2

Tested up to WordPress 6.2.2
 Prevent cross-site script injection on Settings page(
CVE-2022-47606). Note this vulnerability may only be exploited if the user is already
logged in with Admin privilege.

#### 0.2.1

Tested up to WordPress 4.3
 Minor fixes to avoid 404 on (unnecessary) files.

#### 0.2.0

Publish on WordPress.org.

#### 0.1.1

Stop debugging statements flooding the error log.

#### 0.1.0

Initial proof of concept.

## 额外信息

 *  版本 **0.2.2**
 *  最后更新：**3 年前**
 *  活跃安装数量 **1,000+**
 *  WordPress 版本 ** 3.6 或更高版本 **
 *  已测试的最高版本为 **6.2.9**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-cors/)
 * 标签
 * [ajax](https://cn.wordpress.org/plugins/tags/ajax/)[cors](https://cn.wordpress.org/plugins/tags/cors/)
   [rest](https://cn.wordpress.org/plugins/tags/rest/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-cors/advanced/)

## 评级

 2.3 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/wp-cors/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-cors/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-cors/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-cors/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/wp-cors/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-cors/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-cors/reviews/)

## 贡献者

 *   [ tstephenson ](https://profiles.wordpress.org/tstephenson/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-cors/)