Edge SWG admins may be looking for an option to block AI Mode search in the Google search portal.
Option 1 - Simple policy to block Google AI Mode search
The following CPL policy should block AI Mode as of now:
<proxy>
url.domain=google.com url.path.substring=search url.query.substring="udm=50" deny
Option 2 - Extended policy to enforce regular search for Google search queries
define condition Method_CONNECT
http.method=(CONNECT)
end condition Method_CONNECT
<proxy> condition=!Method_CONNECT
url.domain=google.com url.query.regex=!"" action.GoogleAIMode_rewrite1(yes)
url.domain=google.com url.query.substring="udm=" action.GoogleAIMode_rewrite2(yes)
url.domain=google.com url.path.substring=search url.query.substring=!"udm=" action.GoogleAIMode_rewrite3(yes)
define action GoogleAIMode_rewrite1
rewrite(url, "^(.*)$", "$(1)/?udm=14")
end
define action GoogleAIMode_rewrite2
rewrite(url, "^(.*)udm=\d+(.*)$", "$(1)udm=14$(2)")
end
define action GoogleAIMode_rewrite3
rewrite(url, "^(.*)$", "$(1)&udm=14")
end
Please note that Google may change AI Mode search query parameters with time hence the policy rule may stop working.