erichard/cloudfront-proxies-bundle 问题修复 & 功能扩展

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

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

erichard/cloudfront-proxies-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require erichard/cloudfront-proxies-bundle

包简介

Trusts the AWS Cloudfront proxies IP in your Symfony projects

README 文档

README

The bundle automatically register all Cloudfront IP range to the list of the trusted proxies.

The IP range is downloaded from AWS : https://ip-ranges.amazonaws.com/ip-ranges.json

These IPs are cached for one hour by default.

Configuration

Check the default configuration below.

# config/packages/erichard_cloudfront_proxies.yaml

erichard_cloudfront_proxies:
  expire: 3600
  cache: cache.app
  ip_range_url: https://ip-ranges.amazonaws.com/ip-ranges.json

Note

The IP list is only downloaded when the request contains a Cloudfront-Forwarded-Proto header. According to the AWS documentation this header is not sent by default so you need to configure your Cloudfront distribution properly.

The bundle also take care of setting back the X-Forwarded-Proto header based on Cloudfront-Forwarded-Proto.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-16