django - Django AWS Zappa 部署 satic 文件错误
问题描述
我已经设法使用 Zappa 将我的站点部署到 AWS Lambda,这很复杂,但我最终做到了。但是我遇到了一些我的图标没有加载的问题。请参阅下面的控制台日志。
Blocked loading mixed active content "http://localhost:8000/static/scss/icons/simple-line-icons//fonts/Simple-Line-Icons.ttf?-i3a2kk"[Learn More]
login
Blocked loading mixed active content "http://localhost:8000/static/scss/icons/themify-icons/fonts/themify.woff"[Learn More]
login
Blocked loading mixed active content "http://localhost:8000/static/scss/icons/material-design-iconic-font//fonts/materialdesignicons-webfont.woff2?v=1.8.36"[Learn More]
login
Blocked loading mixed active content "http://localhost:8000/static/scss/icons/font-awesome/webfonts/fa-solid-900.woff2"[Learn More]
login
Blocked loading mixed active content "http://localhost:8000/static/scss/icons/font-awesome/webfonts/fa-regular-400.woff2"[Learn More]
该网站托管在https://h28ijhkwy3.execute-api.eu-west-2.amazonaws.com/Demo/account/login
所以,我相信这个文件是从我的 style.css 文件中调用的:
@import url(../scss/icons/material-design-iconic-font/css/materialdesignicons.min.css);
我已经尝试放置完整的 AWS S3 路径,但它仍然无法正常工作,并且我仍然在控制台中遇到相同的错误。
解决方案
你在用火狐吗?如果是这样,这个答案可能会对您有所帮助:https ://stackoverflow.com/a/18251129/1014508
TLDR;Firefox 23 默认阻止混合活动内容
推荐阅读
- blazor - 具有多个命名参数的 Blazor HTTPRequestMessage
- python - 如何在 plotly 中绘制 3D 表面上的边缘线?
- c++ - 为什么在类成员函数 C++ 中使用关键字“const”两次
- r - 如何有效地在(稀疏)矩阵中插入行?
- ruby-on-rails - RAILS 6.1 支持 ACTIVE STORAGE 中的多个 has_one_attached?
- kubernetes - 使用 kOps 更新 kubernetes 会导致 calico-node 失败并显示“BIRD 未准备好:BGP 未建立”
- java - PDF 小册子 - 可用。需要来自小册子示例的 PDF
- c# - 如何使用 WinForms c# 制作加速机制
- android - 即使应用程序在特定时间关闭,也可以打开电话拨号器
- azure - 在 ARM 模板中的属性名称值中调用引用/部署函数