我使用Django Compressor進行脫機壓縮並將壓縮的靜態文件存儲在Amazon S3上。我的問題是manifest.json
引用指定http://
作爲協議的緩存文件:Django Compressor的manifest.json中的協議相關url
<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:
,但尚未找到以這種方式生成它的方法。
有沒有辦法用協議相關的URL生成manifest.json
?