定制 wp-php-toolkit/corsproxy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wp-php-toolkit/corsproxy

最新稳定版本:v0.4.1

Composer 安装命令:

composer require wp-php-toolkit/corsproxy

包简介

CORSProxy component for WordPress.

README 文档

README

A PHP CORS proxy need to integrate git clone via fetch().

Configuration

In order to avoid running a CORS proxy that is easy to abuse by default, the proxy requires administrators to explicitly declare what to do about rate-limiting, by doing one of the following:

  • Provide a rate-limiting function playground_cors_proxy_maybe_rate_limit().
  • Define a truthy PLAYGROUND_CORS_PROXY_DISABLE_RATE_LIMIT to explicitly disable rate-limiting.

These can be provided in an optional cors-proxy-config.php file in the same directory as cors-proxy.php or in a PHP file that is loaded before all PHP execution via the auto_prepend_file php.ini option.

Usage

Request http://127.0.0.1:5263/proxy.php/https://w.org/?test=1 to get the response from https://w.org/?test=1 plus the CORS headers.

Development and testing

Design decisions

  • Stream data both ways, don't buffer.
  • Don't pass auth headers in either direction.
    • Opt-in for request headers possible using X-Cors-Proxy-Allowed-Request-Headers.
  • Refuse to request private IPs.
  • Refuse to process non-GET non-POST non-OPTIONS requests.
  • Refuse to process POST request body larger than, say, 100KB.
  • Refuse to process responses larger than, say, 100MB.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-09-06