NOTE: For the latest Safe Search policy, see the ZIP file attached to knowledge article 000021435.
To use policy to enable youtube Safety Mode, complete the following procedure.
- Navigate to the ProxySG Management Console: https://proxySG_IP:8082
- Go to Configuration -> Policy -> Policy Files
- In the Install Local File from pulldown, select Text Editor.
- Click Install. Edit and Install the Local File window displays.
- Copy the following policy:
; === Safety Mode for YouTube ===
<proxy BC_SafeSearch_YouTube_cookies> url.domain=youtube.com
request.header.cookie.exact="PREF=" action.BC_SafeSearch_YouTube_Cookie_Rewrite(yes)
request.header.cookie="PREF=" action.BC_SafeSearch_YouTube_Cookie_Rewrite1(yes)
action.BC_SafeSearch_YouTube_Cookie_append(yes)
define action BC_SafeSearch_YouTube_Cookie_Rewrite
rewrite( request.header.Cookie, "PREF=", "PREF=f2=8000000" )
end
define action BC_SafeSearch_YouTube_Cookie_Rewrite1
rewrite( request.header.Cookie, "(PREF=[^,]+)", "$(1)&f2=8000000" )
end
define action BC_SafeSearch_YouTube_Cookie_append
append( request.header.Cookie, "PREF=f2=8000000" )
end
; === End of Safety Mode for YouTube ===
Paste the policy into the
Edit and Install the Local File window.
Click
Install.
Note: This KB article was updated on 4/3/2020