-1

I making a blog posting web site and also check different cors configurations for aws but any of this can solve this issue.Issue is urls in css files like

   @import url(fonts.css); background-image:
url("paper.gif");

and like these things is not working.And also in console I got a error like this

net::ERR_ABORTED 403 (Forbidden)

so any of font awesome icons are also not working.Do you have any suggestion let me know.

3
  • This might help stackoverflow.com/questions/18724718/… Commented Jul 29, 2021 at 15:51
  • Are these web assets served from S3 or from your web server? If served from S3, are they public? Commented Jul 29, 2021 at 15:57
  • @jarmod yeah they are public Commented Jul 30, 2021 at 2:12

1 Answer 1

1

This is because you in bucket policy is blocked the other urls. therefore they don't allow to any other url to interfere your bucket objects.And the solution for this question is first you have to do is disable block all public acces in permission picture of after block all public access.After that add this to bucket policy

    {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::dtblog/*"
        }
    ]
}

Then you good to go.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.