首页 > 解决方案 > Django AWS S3 存储桶:CKEditor 给出 SignatureDoesNotMatch 错误

问题描述

我已将所有静态文件放在 AWS 上的 S3 存储桶中。图片、javascript 和 CSS 在网站上运行良好,但 CKEditor 富文本编辑器不会显示,并且给我以下错误:

SignatureDoesNotMatch. The request signature we calculated does not match the signature you provided. Check your key and signing method

TypeError: c[a] is undefined // I think that this error is only because of the first one

There is also a script that didn't load in the console for the CKEditor which I think  is also due to the signature error

这是我的设置

AWS_ACCESS_KEY_ID = id
AWS_SECRET_ACCESS_KEY = secret_id
AWS_STORAGE_BUCKET_NAME = bucket_name
AWS_S3_FILE_OVERWRITE = False
AWS_DEFAULT_ACL = None
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
AWS_S3_REGION_NAME = 'eu-west-2'
AWS_S3_ADDRESSING_STYLE = "virtual"
TEXT_CKEDITOR_BASE_PATH = 'https://bucket_name.s3.amazonaws.com/ckeditor/ckeditor/'

注意 此错误也发生在管理页面中,因此导致错误的不是放入 CKEditor 的 javascript,因此我没有在此处共享该 javascript,因为它无关紧要

标签: pythondjangoamazon-web-servicesamazon-s3ckeditor

解决方案


推荐阅读