首页 > 解决方案 > 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 路径,但它仍然无法正常工作,并且我仍然在控制台中遇到相同的错误。

标签: djangoamazon-web-servicesamazon-s3aws-lambdazappa

解决方案


你在用火狐吗?如果是这样,这个答案可能会对您有所帮助:https ://stackoverflow.com/a/18251129/1014508

TLDR;Firefox 23 默认阻止混合活动内容


推荐阅读