Skip to content
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

Bypass proxy when extension is installed #5

Open
markijbema opened this issue Apr 9, 2014 · 6 comments
Open

Bypass proxy when extension is installed #5

markijbema opened this issue Apr 9, 2014 · 6 comments

Comments

@markijbema
Copy link
Member

I propose adding a header using the extensions, for instance, for Chrome, see:

http://stackoverflow.com/a/12962124/623827

Then in the proxy, when this header is set, we can redirect, just like we do with publishers:

https://github.com/Factlink/web-proxy/blob/master/lib/redirect_if_publisher.rb

@EamonNerbonne
Copy link
Contributor

This will require browser-specific changes to the extensions.

If so, I'd prefer doing the redirect/url-rewrite directly in the extension since that's faster.

@markijbema
Copy link
Member Author

That will require browser specific changes as well, right? And this will be a lot easier, and require no factlink-specific code, other than (possibly) the knowledge of the location of the proxies. When doing it ourselves, we need to copy the parsing logic from the proxy to the extensions as well for instance.

@markijbema
Copy link
Member Author

(also, the entire code for chrome needed is already in that answer)

@EamonNerbonne
Copy link
Contributor

parsing logic? We just need to rewrite the url to the value of the 'url' query-parameter, right?
e.g. http://stackoverflow.com/questions/10256922/is-it-possible-to-rewrite-url-with-extra-parameters-with-a-chrome-extension

@markijbema
Copy link
Member Author

As long as we create urls that way.

@EamonNerbonne
Copy link
Contributor

Still, there's a speed+complexity difference since doing it in the extension avoids a redirect and is about as hard as adding headers yet obviates the need for proxy logic. Furthermore, the way urls are formatted is already a cross-project api as core creates em and proxy consumes them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants