如果存在某个Cookie,则绕过Akamai的特定网址 [英] Bypass specific URL from Akamai if certain cookie exist

查看:967
本文介绍了如果存在某个Cookie,则绕过Akamai的特定网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果指定的Cookie存在(即)用户在特定页面上登录,我希望Akamai不缓存某些网址。

解决方案

边缘服务器在执行请求之前不检查cookie你的原始服务器,我从来没有在他们的任何菜单,conf屏幕或文档中看到类似的东西。



但是,有几种方式我可以想到你可以得到我想要的效果。


  1. 您可以在配置设置中指定相应的数字属性您不希望缓存的路径或URL。如果你在谈论登录用户,你可能有一个只有他们会得到的路径,或者你可以设置这样的事情服务器端。例如。对于在线课程,您将有 www.course.com/php.html 任何人都可以得到,而您可以使用 www.course.com/ student / php-lesson-1.html 获取实际登录课程内容。指定 / student / * 不会被缓存。


  2. 相同的页面同时登录和不记录用户,并且不能这样做,你可以检查服务器端,如果他们登录,如果是这样,添加一个缓存破坏者的链接,当他们跟随一个链接自动添加高速缓存断路器。你也可以做这个客户端,如果你想,但它会更安全,更快的服务器端。作为一个注意事项,这可以是userid-random#。


  3. 如果两者都没有,那么它将保持足够的独特性,没有其他人会请求它,以上是可行的,有另一种方式,我可以想到,这是一个有点非常规说至少,但它会工作。使用其他名称在文档根目录中创建符号链接的目录,以便可以应用第一个选项并使其免于缓存。然后你检查该家伙是否登录,如果是这样的话,额外的目录到链接。从akamai的角度来看 www.mysite.com/logged-on/page.html 可以免于缓存, www.mysite.com/content /page.html 已缓存。在您的服务器上如果 / logged-on / 象征性地链接到 / content / / p>


  4. 当他们登录时,您可以将他们发送到一个设置为ServerAlias的子域,所以在一边是一样的,但在Akamai有不同的缓存处理



I would like Akamai not to cache certain URLs if a specified cookie exist (i.e) If user logged in on specific pages. Is there anyway we can do with Akamai?

解决方案

The Edge Server doesn't check for a cookie before it does the request to your origin server and I have never seen anything like that in any of their menus, conf screens or documentation.

However, there are a few ways I can think of that you can get the effect that I think you're looking for.

  1. You can specify in the configuration settings for the respective digital property what path(s) or URL(s) you don't want it to cache. If you're talking about a logged on user, you might have a path that only they would get to or you could set up such a thing server side. E.g. for an online course you would have www.course.com/php.html that anybody could get to whereas you might use www.course.com/student/php-lesson-1.html for the actual logged on lessons content. Specifying that /student/* would not be cached would solve that.

  2. If you are serving the same pages to both logged on and not-logged on users and can't do it that way, you could check server-side if they're logged on and if so add a cache-breaker to the links so when they follow a link a cache-breaker is automatically added. You could also do this client side if you want, but it would be more secure and faster to do it server-side. As a note on this, this could be userid-random#. That would keep it unique enough when combined with the page that nobody else would request it and get the earlier 'cache-broken' page.

  3. If neither of the above are workable, there is one other way I can think of, which is a bit unconventional to say the least, but it would work. Create symbolically linked directory in your document root with another name so that you can apply the first option and exempt it from cacheing. Then you check if the guy is logged on and if so prepend the extra directory to the links. From akamai's point of view www.mysite.com/logged-on/page.html can be exempt from cache where www.mysite.com/content/page.html is cached. On your server if /logged-on/ symbolically links over to /content/ then you're all set.

  4. When they login you could send them to a subdomain which is set up as a ServerAlias, so on your side it's the same, but on Akamai has differnt cache handling rules.

这篇关于如果存在某个Cookie,则绕过Akamai的特定网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆