python - 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,因为它无关紧要
解决方案
推荐阅读
- kubernetes - 在集群上创建通道时出现超时错误
- javascript - 接口属性属于不同接口属性的类型
- kotlin - 将类引用作为方法参数传递的最佳方法是什么?
- c++ - 为什么我在具有 16 GB 内存的 mac 上看到多 TB 范围内的 c++ 指针?
- react-native - 反应原生调试器无法识别新文件添加
- python - 我希望单个数字与表中的其他多位数字更好地对齐
- python - 使用 python-docx 添加页码
- python - 无法连接mongodb,ssl错误,超时错误
- node.js - 我将前端和后端应用程序上传到 Heroku,但无法使用 jwt()
- c++ - 您可以在 C++ 中匿名填充向量向量吗?