我正在使用具有离线压缩功能的Django Compressor,并将压缩的静态文件存储在 Amazon S3 上。我的问题是通过指定为协议来manifest.json
引用缓存文件:http://
<link rel=\"stylesheet\"
href=\"http://stage-media.dropspot-app.com.s3.amazonaws.com/static/CACHE/css/abffb776bf3e.css\"
type=\"text/css\" media=\"all\" /><link rel=\"stylesheet\"
href=\"http://stage-media.dropspot-app.com.s3.amazonaws.com/static/CACHE/css/9533603cdbaa.css\"
type=\"text/css\" media=\"screen\"
/>
这会导致通过 HTTPS 访问页面时不会加载缓存文件:
The page at 'https://example.com' was loaded over HTTPS, but ran insecure content from 'http://example.com.s3.amazonaws.com/static/CACHE/css/abffb776bf3e.css': this content should also be loaded over HTTPS.
解决方案是在manifest.json
没有 url 的情况下引用缓存的文件http:
,但还没有找到一种方法让它以这种方式生成。
有没有办法manifest.json
用相对协议的 url 生成?