search cancel

How to enable images.google.com and show searched images after blocking the google search engine

book

Article ID: 175794

calendar_today

Updated On:

Products

Advanced Secure Gateway Software - ASG ProxySG Software - SGOS

Issue/Introduction

You have blocked google search engine, but you want to enable the google image search and show searched images.

Adding "images.google.com" to an allowed list in the VPM is not working. The main search page will come up but then the search results come up under "www.google.com/..." with a long, non-sensical URL string. 

For example, searching for "bob" we get the URL

"https://www.google.com/searchtbm=isch&source=hp&biw=1329&bih=757&ei=JmJMXb3tJYuttQaliIKQCg&q=bob&oq=bob&gs_l=img.3..0l10.2643.2850..3226...0.0..0.47.130.3......0....1..gws-wiz-img.....0.hrOOiXrxMm8&ved=&uact=5" and this is then blocked.

Environment

There are 2 prerequisite requirements for your environment:

Because google.com defaults to HTTPS. As a result, for the solution to work, you need to meet the prerequisite:

  1. SSL Intercept is enabled to intercept traffic
  2. Explicit Deployment: Detect Protocol is enabled to hand off the traffic to SSL Proxy -> This part, you need to Configuration->Services->Proxy Services->under Proxy Services -> expand the Standard tab -> find Explicit HTTP -> click Edit Service -> on the pop-up window, enable the "Detect Protocol"

 

Resolution

After you met the 2 prerequisite conditions:

  1. You can bypass two strings.  "tbm=isch" is the string in google image search URL, and "source=images" is the string in URL that redirects to the image source website 
  2. You can define a Condition rule in CPL code which only enables the substring "tbm=isch" or "source=images" that belongs to google.com URL. Therefore, it won't impact your other domains which will potentially contain these strings within their URL. 

CPL Code:

<ssl-intercept>
url.domain="google.com" ssl.forward_proxy(https)

<proxy>
condition=GoogleImage allow
url.domain=images.google.com allow
url.domain=google.com deny

<proxy>
url.domain=google.com http.method=CONNECT allow
define condition GoogleImage
   url.substring="tbm=isch"
   url.substring="source=images"
end condition GoogleImage

 

Attachments