atk14/cloudflare-env-adjuster 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

atk14/cloudflare-env-adjuster

最新稳定版本:v0.1.2

Composer 安装命令:

composer require atk14/cloudflare-env-adjuster

包简介

Adjust the environment of a web app behind Cloudflare protection.

README 文档

README

Build Status

Adjust the environment of a web app behind Cloudflare protection.

Basically if CloudflareEnvAdjuster detects that the remote address in the current request is from one of Cloudflare's ranges, it transparently replaces $_SERVER["REMOTE_ADDR"] with $_SERVER["HTTP_X_FORWARDED_FOR"] and stores the original REMOTE_ADDR into $_SERVER["X_CF_REMOTE_ADDR"].

Usage in an ATK14 application

<?php
// file: config/after_initialize.php
CloudflareEnvAdjuster::AdjustEnv();

Usage in a non-ATK14 application

Place the call to CloudflareEnvAdjuster::AdjustEnv() as close to the beginning of your PHP script as you can.

Installation

Just use the Composer:

composer require atk14/cloudflare-env-adjuster

License

CloudflareEnvAdjuster is free software distributed under the terms of the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固