I need to modify the header of a websocket request wss://
chat.exaple.com, so I'm using chrome.declarativeNetRequest (and resourceType websocket), but the normal host_permissions `https://*.
example.com/` won't match the request. So I added `wss://*.
example.com` to host_permissions, and it works in developer mode.
But when uploading it to Chrome web store, I get an error message of wrong host_permissions declared in manifest.json
Here is how I finally get it to work:
1. remove the wss:// permission from host_permissions
2. add `wss://*/*` to optional_host_permissions
3. Request permission of `wss://
chat.example.com` at runtime with chrome.permissions.request API.
I think there are some inconsistent behaviours here, hope I can get some clarification here.