0

サーバーにcrxファイルを配置しようとしています。ページは読み込み中ですが、エラーは発生していません。

誰かが助けることができるなら、以下はいくつかの情報です - どうもありがとう。

サーバーは apache2 で、mime.types に application/x-chrome-extension という行を追加しました

私が持っているhtmlページで:

</script>
</head>
<body onload='init()'>
<pre id='output'></pre>
<embed type="application/x-chrome-extension" id="complex" width='0' height='0'  
        pluginspage="complex_to_pack.crx"/>
 </body>
</html>

そしてmanifest.json:

{
 // Required
 "name": "complex",
 "version": "1",
 "manifest_version": 2,
 "plugins": [
 { "path": "npcomplex.dll", "public": true }
 ]
 }
4

1 に答える 1

0

HTTPサーバー構成の説明から、content-typeを設定していないように思われます。これは、デフォルトである可能性が最も高いためX-Content-Type-Options: no sniff、次のいずれかである必要があります。

empty string
"text/plain"
"application/octet-stream"
"unknown/unknown"
"application/unknown"
"*/*"

Chrome拡張機能のホスティングドキュメント(http://developer.chrome.com/extensions/hosting.html)-

"The most common reason for failing to recognize an installable file is that the server sends the header X-Content-Type-Options: no sniff. The second most common reason is that the server sends an unknown content type—one that isn't in the previous list. To fix an HTTP header issue, either change the configuration of the server or try hosting the .crx file at another server."

于 2012-10-20T15:51:25.193 に答える