這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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.

使用者評論

閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP-CORS〉的開發相關工作。

參與者

將〈WP-CORS〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

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.