Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted access to '/static/images/XXX.png' denied for Amazon S3 #520

Closed
rene-schwabe opened this issue Dec 12, 2023 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@rene-schwabe
Copy link

We use Amazon S3 as a CDN for our images. We have added a "site_logo" via Settings.py:
"site_logo": "/static/images/XXX.png",

I can see the image in the S3 bucket and it is publicly accessible.

However, we cannot call the Django admin because we get the message "Bad Request (400)" - Attempted access to '/static/images/XXX.png' denied.

Is it possible to use jazzmin logo for admin with Amazon S3?

@thencke
Copy link

thencke commented Jan 24, 2024

I have a similar issue with font-awesome icons in sidebar/buttons, it is not applying the aws signature in the get request.

Did you fin any solution @rene-schwabe ?

@rene-schwabe
Copy link
Author

@rene-schwabe
No, no solution found yet.

@jamesgilmorelyst jamesgilmorelyst added the enhancement New feature or request label Mar 23, 2024
@enoquesantos
Copy link

I solve this adding only the image path, don't add /static/ because jazzmin will concat with STATIC_URL.

I'm using DigitalOcean Spaces with Django and image appears normally after collectstatic.

Instead of

/static/images/XXX.png

Use this:

images/XXX.png

I hope this helps

@rene-schwabe
Copy link
Author

I solve this adding only the image path, don't add /static/ because jazzmin will concat with STATIC_URL.

I'm using DigitalOcean Spaces with Django and image appears normally after collectstatic.

Instead of

/static/images/XXX.png

Use this:

images/XXX.png

I hope this helps

Thanks, that's the solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants