diff --git a/CloudFront/_CloudFront.md b/CloudFront/_CloudFront.md index dea52e0..fb810a3 100644 --- a/CloudFront/_CloudFront.md +++ b/CloudFront/_CloudFront.md @@ -93,3 +93,36 @@ You can make your own **Caching Policy**: - **Cookies**: which cookies are a part of the **Cache Key**. - **Query String**: which query string parameters are a part of the **Cache Key**. - **Compression Support**: What compression format is part of the **Cache Key**. + +### Origin Request +Happens when there is a cache miss and CloudFront must reach out to Origin to retrieve data. + +**Origin Request** always returns: +- URL Path +- Request Body (if present) +- Specific HTTP Headers: + - Host + - User Agent + - `X-Amz-Cf-Id` + +**Origin Request** doesn't include these by default: +- URL Query String +- Cookies +- All other HTTP Headers + +**Cache Key** information (set by the **Cache Policy**) are automatically included in **Origin Requests**: +- URL Query Strings +- HTTP Headers +- Cookies + +### Response Header Policy +Allows you to modify the HTTP Headers in the response that viewers will see. +AWS has managed policies for you to use and you can make your own also. + +⚠️ If you are dealing with CORS, you will be setting things here, as this will mess with them. + +## Origin Access Identity +**OAI** makes sure that an S3 bucket is only accessible through **CloudFront** and not the internet. +Lots of drawbacks. + +