-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential solution for communicating with AMO #126
Comments
Firefox doesn't allow content scripts on restricted domains (such as AMO), so this won't work. |
Thanks for brainstorming this! I missed this! |
The solution by @stoically here seems the way to go - #122 (comment) - if I get some time I'll prototype this out. |
@stoically is there an issue with the domain fronter and having cookies? |
@Noitidart Not sure, never used domain fronting myself, but looking at the CRXViewer code it seems that only specific request headers are modified, which should leave cookie headers intact. |
I'm glad to see this extension gaining forward momentum again! :) |
It's all thanks to the community!
…On Mon, May 20, 2019 at 5:09 PM stevennyman ***@***.***> wrote:
I'm glad to see this extension gaining forward momentum again! :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#126?email_source=notifications&email_token=ABQTZCJUVZV3U2U32CBSLSDPWM4VLA5CNFSM4HAVLYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV2MPZY#issuecomment-494192615>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQTZCKIZJQCOAE77WK74N3PWM4VLANCNFSM4HAVLYYA>
.
|
One potential solution for the CORS problem (#113, #107, #117, #122, etc.) might be to inject a content script onto any AMO page running in an invisible iframe with a specific URL such as https://addons.mozilla.org/en-US/firefox/null/ with
"run_at": "document_start"
and"all_frames": true
. Then,fetch
requests would be run from that page, and their results would be returned by monitoring thewebRequest
API for responses. (An example of thewebrequest
API can be found at https://github.com/mdn/webextensions-examples/tree/master/http-response.) Otherwise, response objects could be transferred via content script to background script communication methods such as messaging. Code can be injected to run as if it was on the page by including the following in the content script:(partially borrowed from https://stackoverflow.com/questions/55270830/intercepted-xhr-run-function-before-raising-load)
This should theoretically fix te extension without anyone having to invest in hosting servers and the like.
I'm not sure if I will have the time to implement something like this, so @Noitidart or someone else might want to look into it.
The text was updated successfully, but these errors were encountered: