on a Wordpress site linking to pdfs successfully up till now, adding a new course and associated links to pdfs stored in S3.
here's my bucket policy
"Version": "2012-10-17",
"Id": "Policy1495663956019",
"Statement": [
{
"Sid": "Stmt1495663819956",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": "arn:aws:s3:::courses-example-com/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://example.com/*",
"http://www.example.com/*",
"https://example
"https://www.example.com/*"
]
}
}
}
]
}
The bucket has different folders for each course - course1/ course2/ etc
I copy the Object URL from S3 as the link within Wordpress
Here is an example of a link used
<a href="https://s3.amazonaws.com/courses-example-com/course-1/downloads/participant-text.pdf" target="_blank" rel="noopener">Download the course text here.</a>
Some of the links, both those that work or do not (access denied) may have rel="nooperner noreferer", yet some of these work, while others do not. When trying to remove the noreferer - Wordpress just adds it back in.... changing the link to open in the same window is not desired as it loses the student's place in the course...
I am not sure how to check the header for the referer that is likely sent from the different pages... might provide a clue. Also, not sure how to override the Wordpress automatic addition of noreferer.
check S3 permissions, went over the bucket policy carefully, cleared cache, tried different browsers, rebooted, cleared cache on site host side,
ideas?
cheers,
Fred