Cuby Dev
Cuby Dev

Reputation: 121

Chrome Extension Manifest permissions for same domain

I just got a strange issue about the permission of the chrome extension. For the same domain, I can access some URLs but can't access another URL.

Below is part of manifest.json.

"permissions": ["storage"], "host_permissions": ["*://*.domain.com/*"], "content_scripts": [{ "js": ["js/content.js"], "css": ["css/main.css"], "matches": ["*://*.domain.com/*"], "run_at": "document_idle", "all_frames": true }]

https://dev.domain.com/tech works good but https://dev.domain.com/new doesn't work.

I can't know the correct reason. If someone knows the above issue, plz help me. Thanks.

Upvotes: 0

Views: 615

Answers (1)

Cuby Dev
Cuby Dev

Reputation: 121

I fixed it by setting "match_about_blank": true on the manifest file. By default, an extension can't access the blank iframe content. It's the reason why I can't access different URLs on the same domain.

Upvotes: 1

Related Questions