My particular use case requires running a user script inside an iframe on my iPad. Unfortunately, it is not a publicly accessible domain, so I cannot share it here.
Attempting to inject my script fails with
[Error] Refused to execute a script because its hash, its nonce, or 'unsafe-inline' appears in neither the script-src directive nor the default-src directive of the Content Security Policy. (auth, line 33)
once the iframe is included, but I am able to see the script present in the HTML for the iframe.
It seems to me that since this proxy is able to arbitrarily modify the presented HTML, it would be possible to compute the hash of our injected script and add it to the CSP before presenting the page, thus avoiding this issue.
My particular use case requires running a user script inside an iframe on my iPad. Unfortunately, it is not a publicly accessible domain, so I cannot share it here.
Attempting to inject my script fails with
[Error] Refused to execute a script because its hash, its nonce, or 'unsafe-inline' appears in neither the script-src directive nor the default-src directive of the Content Security Policy. (auth, line 33)once the iframe is included, but I am able to see the script present in the HTML for the iframe.
It seems to me that since this proxy is able to arbitrarily modify the presented HTML, it would be possible to compute the hash of our injected script and add it to the CSP before presenting the page, thus avoiding this issue.