Re: [Rabbit-proxy-development] Session handling
Brought to you by:
ernimril
From: Robert O. <ro...@kh...> - 2006-09-18 19:00:23
|
Fredric Palmgren wrote: > Hello, > I'm trying to create a new filter, to be able to add content to webpages > according to the following rules: Are you using rabbit as a normal proxy or as a reverse proxy? This is the first question that really needs an answer. I will assume that you have a normal proxy, since if it were your web pages you could accomplish this filtering easier. > According to the rules, my problem to solve, is, that I need some form of > sessionhandling to be able to figure out if a page shuld contain the extra > content or not. Rabbit has no session handling in itself. You can try to add cookies or something else, but it will not work nice for all clients and cookies are per domain so you can not use cookies reliably. The only thing I can think of is to try to include javascript, but that will also be quirky and will not work well for images or plain text documents. Perhaps you can mix cookies and javascript and hope that your users have both of them enabled. I can not say that I know of a good way to do this. > I've made a Filter in RabbIT that extends SimpleTagFilter. this works nicely > to add the extra frame when needed, but it seems like I cannot solve my > problem to check if am to add extra content to regular webpages or not. I am > not sure if I use the correct base class, Not sure if that will work for complex nested frames. > I cannot reach an HttpSeevletRequest instance from SimpleTagFilter. > Any ideas what I should to to be able to solve this problem? Rabbit is not a servlet engine so you will never be able to do that. Also note that what you are trying to do is the opposite of rabbits goal, adding extra content make the download go slower. Although I want to make rabbit easy to use for general filtering this kind of filtering is not high on my TODO-list. There may be easier tools to use out there, but I do not know about them. Have fun /robo |