2012-10-09 114 views
0

我试图把crx文件放到服务器上。该页面正在加载,但不会产生任何错误。部署chrome扩展

以下是一些信息,如果有人可以帮助 - 非常感谢。

该服务器的Apache2和我加入的mime.types行 应用程序/ x-铬扩展

在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 } 
] 
} 

回答

0

从您对HTTP服务器配置的描述中,听起来好像您没有设置内容类型,这很可能是默认为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."