Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erichard/cloudfrontproxiesbundle
https://github.com/erichard/cloudfrontproxiesbundle
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/erichard/cloudfrontproxiesbundle
- Owner: erichard
- License: mit
- Created: 2021-12-16T10:55:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-16T14:29:21.000Z (about 3 years ago)
- Last Synced: 2024-10-12T22:12:34.347Z (3 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Cloudfront Proxies
==================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.
```yaml
# config/packages/erichard_cloudfront_proxies.yamlerichard_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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior) 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`.