当前位置:网站首页>PHP Laravel 使用 aws 负载均衡器的 ip 错误问题
PHP Laravel 使用 aws 负载均衡器的 ip 错误问题
2022-06-29 18:47:00 【简单教程】
PHP Laravel 使用 aws 负载均衡器后,IP 地址会显示为内网,这时候只要修改文件
api/app/Http/Middleware/TrustProxies.php
中的相关代码即可
<?php namespace App\Http\Middleware; use Illuminate\Http\Request; use Fideloper\Proxy\TrustProxies as Middleware; class TrustProxies extends Middleware { /** * The trusted proxies for this application. * * @var array */ protected $proxies = '*'; /** * The headers that should be used to detect proxies. * * @var string */ protected $headers = Request::HEADER_X_FORWARDED_ALL; }
边栏推荐
- layer.prompt
- JS text particle dynamic background
- Machine learning 8-artificial neural network
- C Primer Plus Chapter 12_ Storage categories, links, and memory management_ Codes and exercises
- Panda Parkour JS games code
- Apache Doris 基本使用总结
- Page Object与数据驱动测试
- Cannot retrieve repository metadata processing records
- 第三方工具与框架集成
- Using protobuf to link MySQL in unrealeengine plug-in
猜你喜欢

Machine learning 7-Support vector machine

Shandong University project training (VI) Click event display line chart

76.二叉树的最近公共祖先

学习放大器至少要3年?

熊猫跑酷js小游戏代码

CAD Assistant - 3D模型格式转换利器

习题8 #第8章 Verilog有限状态机设计-4 #Verilog #Quartus #modelsim

tp5 where查询数据库中的某个字段是否包含某个值,不用like的方法,模糊查询

SQL Server Backup and restore command operations

1. 使用STM32CubeMX建立STM32G030C8T6项目工程
随机推荐
第02章_MySQL的数据目录
网站加了CDN后,字体图标报错Access-Control-Allow-Origin
Data warehouse model layered ODS, DWD, DWM practice
Page Object与数据驱动测试
ChainSafe跨链桥部署教程
Unittest unit test framework
75.二叉搜索树额最近公共祖先
AI场景存储优化:云知声超算平台基于 JuiceFS 的存储实践
元素等待机制
Amazing pandaverse:meta "borderless, to activate fashion attributes in the new journey of 2.0
How to use the oak camera on raspberry pie?
为什么信息化 ≠ 数字化?终于有人讲明白了
微信推出图片大爆炸功能;苹果自研 5G 芯片或已失败;微软解决导致 Edge 停止响应的 bug|极客头条
AMAZING PANDAVERSE:META”无国界,来2.0新征程激活时髦属性
Wechat launched the picture big bang function; Apple's self-developed 5g chip may have failed; Microsoft solves the bug that causes edge to stop responding | geek headlines
Apache Doris 基本使用总结
第三方工具与框架集成
CAD Assistant - 3D模型格式转换利器
Error [warning] neural network information was performed on socket 'RGB', depth frame is aligned to socket
深度好文 | YOLOv5+DeepSORT多目标跟踪深入解读与测试(含源码)