AWS AmazonCloudFront: Fix x-forwarded-for header name in signed cookies example
Summary
Corrected 'x-forward-for' to 'x-forwarded-for' and fixed a grammar issue in the PHP signed cookies example.
Security assessment
Corrects a header name typo in a code comment; no change to security posture or guidance.
Evidence
- // Get the viewer real IP from the x-forward-for header as $_SERVER['REMOTE_ADDR'] will return viewer facing IP. An alternative option is to use CloudFront-Viewer-Address header. Note that this header is a trusted CloudFront immutable header. Example format: IP:PORT ("CloudFront-Viewer-Address": "1.2.3.4:12345")
Diff
diff --git a/AmazonCloudFront/latest/DeveloperGuide/signed-cookies-PHP.md b/AmazonCloudFront/latest/DeveloperGuide/signed-cookies-PHP.md index 778ca94..ca6389a 100644 --- a//AmazonCloudFront/latest/DeveloperGuide/signed-cookies-PHP.md +++ b//AmazonCloudFront/latest/DeveloperGuide/signed-cookies-PHP.md @@ -33 +33 @@ This approach is useful to stream content, such as HTTP Live Streaming (HLS) or -The following sections breaks down the code example into individual parts. You can find the complete code sample below. +The following sections break down the code example into individual parts. You can find the complete code sample below. @@ -210 +210 @@ In the following example, you can modify the `$policy Condition` element to allo - // Get the viewer real IP from the x-forward-for header as $_SERVER['REMOTE_ADDR'] will return viewer facing IP. An alternative option is to use CloudFront-Viewer-Address header. Note that this header is a trusted CloudFront immutable header. Example format: IP:PORT ("CloudFront-Viewer-Address": "1.2.3.4:12345") + // Get the viewer real IP from the x-forwarded-for header as $_SERVER['REMOTE_ADDR'] will return viewer facing IP. An alternative option is to use CloudFront-Viewer-Address header. Note that this header is a trusted CloudFront immutable header. Example format: IP:PORT ("CloudFront-Viewer-Address": "1.2.3.4:12345")