How to allow Twitter for one page on the ProxySG
search cancel

How to allow Twitter for one page on the ProxySG

book

Article ID: 165844

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

How can you deny limit Twitter access to only one page?

Resolution

VPM Instructions

Specify the following rules in VPM:

1)      Allow the full path to that user in the twitter.com/users/show_for_profile.json?screen_name=USERNAME format and NOT in the twitter/#!/USERNAME format. (twitter/#!/USERNAME is what shows in the address bar and is not processed by the proxy.) Substitute USERNAME with the name of the profile you want to allow. You might want to Allow twitter.com/USERNAME in this rule also.
2)      Deny access to a combined object: twitter.com AND (users OR search).
3)      Allow twitter.com.
4)      Allow referred by twitter.com.
 
 
 
Limitations of this solution:
  • This technique has worked with some customers but didn’t work for others.
  • When a Twitter page is denied, it doesn’t show an error. It just shows a blank Twitter page.
 
CPL Instructions

Given profile name is myProfile123

 <Proxy>
        url.domain="twitter.com/users/show_for_profile.json?screen_name=myProfile123" Allow     ; Rule 1- this allows the specific profile
        condition=OtherTwitterProfiles Deny   ; Rule 2 this denies all other twitter profiles
        url.domain="twitter.com" Allow ; Rule 3 - This allows you to download the eeded scripts from the main twitter page. they are needed to make te profile work
        request.header.Referer="twitter.com" Allow ; Rule4 - allows other back ends referred to by twitter.

define condition OtherTwitterProfiles
 url.domain=twitter.com condition=twitterSub
end

define condition twitterSub
 url.regex="users"
 url.regex="login"
 url.regex="search"
;url.regext=any other string that twitter might use in the future
end