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

Resource bundling for non-external resources? #18

Closed
nosmo opened this issue May 1, 2015 · 2 comments
Closed

Resource bundling for non-external resources? #18

nosmo opened this issue May 1, 2015 · 2 comments
Assignees

Comments

@nosmo
Copy link
Contributor

nosmo commented May 1, 2015

I'd like a way to configure the bundling of non-local resources to the requested domain. Currently if I fetch site.com and site.com has a resource on gstatic.com (let's say), the resource on gstatic.com will be bundled. This is obviously great for CeNo!'s purposes, but for DDeflect this is not optimal - I'd like a means to specify that if I ask for site.com, only resources under site.com be bundled.

@arcrose
Copy link
Contributor

arcrose commented Jun 2, 2015

Okay! I will get on this!

@arcrose
Copy link
Contributor

arcrose commented Jun 8, 2015

I've done a few things to satisfy this request.

  1. I wrote the predicated handler/helper that allows you to augment calls to handlers so that bundler only invokes them if a provided predicate passes.
  2. I wrote a predicate for testing that a resource is on the same host as the original document and provided (commented) code that augments each of the major handlers.
  3. I wrote a URL replacer that will filter only URLs for resources on the same host as the original document and included a (commented) call to it at the start of the proxy's handler list.

I'm going to close this issue trusting that the solutions I've provided cover your request. I will continue to do testing on these functions and inform you if I discover any images. If you do not feel any of this hits the spot, feel free to reopen this issue and explain a little more.

@arcrose arcrose closed this as completed Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants