I have a CloudFront distribution running on a CNAME
cdn.xxx.domain.com
The app is running on
xxx.domain.com
The main app is creating three cookies for the domain cdn.xxx.domain.com
- CloudFront-Key-Pair-Id
- CloudFront-Signature
- CloudFront-Policy
But when I visit cdn.xxx.domain.com
the cookies are not present.
And I get the error
Missing Key-Pair-Id query parameter or cookie value
Because the cookies are not present.
I have also sent the CloudFront instance to forward all Cookies.
The origin is S3. If I turn off Restrict Viewer Access (Use Signed URLs or Signed Cookies) - then I can access the resource. So the URL I am using is correct.
Why can the cnd.
subdomain not use the cookies? You can see here - they are being set in the response from the main app. Using the CDN domain.
Only 2 cookies shown in the image, but there are 3.