2012-05-04 8 views
3

複数のAPIを使用するChrome拡張機能を構築しています。現在、私はこれらのAPIのいずれかを使用できるように設定していますが、マニフェストに秒を追加しようとすると動作しません。私はworkinまたはマニフェストファイルが無効である拡張子のいずれかの結果のカップルを試してみました。クロム拡張で複数の外部ドメインを追加する

"content_security_policy": "script-src 'self' https://domain-1.com; object-src 'self'", 
"content_security_policy": "script-src 'self' https://domain-2.com; object-src 'self'" 

のみ最初のドメインで動作し、無効なマニフェストエラーに

"content_security_policy": "script-src 'self' https://domain-1.com; https://domain-2.com; object-src 'self'", 

を与えます

"content_security_policy": "script-src 'self' https://domain-1.com, https://domain-2.com; object-src 'self'", 

は一つだけcontent_security_policyエントリが存在することができ、無効なマニフェストエラーに

答えて

7

を与えます。あなたは、複数のドメインを指定できますが、カンマでスペースではなくそれらを分離する必要があります。詳細については

"content_security_policy": "script-src 'self' https://domain-1.com https://domain-2.com; object-src 'self'", 

examples section特に、CSP specificationを参照してください。

+0

ありがとう、愚かな私は最も単純な解決策を考えていない –

関連する問題