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

Provide a proxy service for apps to use for fetching resources #22

Closed
davidbau opened this issue Feb 2, 2014 · 2 comments
Closed

Provide a proxy service for apps to use for fetching resources #22

davidbau opened this issue Feb 2, 2014 · 2 comments

Comments

@davidbau
Copy link
Member

davidbau commented Feb 2, 2014

Some resources on the internet are only available if requested by a server, not a browser, so we should provide a simple proxy URL for pencilcode apps to fetch resources by bouncing off the pencilcode server.

Two use cases:

(1) PencilCode/jquery-turtle#25 - smart hit-testing. When using an offdomain image for a turtle, we want to inspect bits so that we can hit-test correctly (i.e., don't collide on transparent corners). But CORS rules prevent us from knowing the bits unless we safely bounce off a server we own. (The security rules are what keeps corp secrets safe from public browser pages javascript.)

(2) PencilCode/jquery-turtle#6 - text-to-speech. When using google translate tts, it only accepts requests without a referrer header. So people who use it bounce their requests off a proxy.

@davidbau
Copy link
Member Author

Design sketch:

http://proxy.pencilcode.net/get?url=(the underlying URL)

This should proxy a get directly, but with CORS-friendly headers.

The jQuery-turtle library should get a "prox" function so that prox 'the url' will create the URL form above. So you can just switch code from "wear URL" to "wear prox URL" to get the proxying.

@davidbau
Copy link
Member Author

davidbau commented Mar 7, 2015

@davidbau davidbau closed this as completed Mar 7, 2015
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

1 participant