kylepaulsen / ResourceOverride

An extension to help you gain full control of any website by redirecting traffic, replacing, editing, or inserting new content.
MIT License
458 stars 116 forks source link

Bug: URL -> File does not work #63

Open gear54rus opened 9 months ago

gear54rus commented 9 months ago

According to API docs for onBeforeRequest, returning {cancel: true} will cancel the request.

Yet this is exactly what we're doing when using URL -> File mode in replaceContent the result of which gets passed to onBeforeRequest.

There seems to be a logical error here? And indeed the scenario doesn't work for me currently. Am I missing something?

image

image

gear54rus commented 9 months ago

@aanand any chance for mainline merge? I am using forked version with my code and it works

shivaRamdeen commented 3 months ago

Temporary hack for anyone experiencing this. Install python if you don't have it and run the following:

cd <DIR_WITH_FILE_TO_SERVE>
python -m http.server 8000

This will give you a localhost server to access your file. Note you may need to allow mixed content in chrome for http content to be loaded.