You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
I'm trying to build a totally static site so as to be able to serve all pages from cache. In order to do that, I'm thinking about getting boomerang's user_ip value from a cookie. I'd ideally set it in a header, but I can't find any way to read the header within Javascript. By doing so, I can have the varnish server set the user's ip in a Set-Cookie header, and keep the whole site in varnish.
So far I've got varnish setting the header. I've got a solid handle on how to get the value from document.cookie, although I'm still wrapping my head around ipv6 compatibility.
Any feedback before I charge ahead? Am I barking up the wrong tree?
Cheers - Callum.
The text was updated successfully, but these errors were encountered:
You can read cookies in JavaScript using document.cookie, or just reuse boomerang's BOOMR.utils.getCookie and BOOMR.utils.getSubCookies methods.
Keep in mind though, that varnish may not cache responses that have a Set-Cookie header. I don't know if this changes if varnish itself sets the header.
bluesmoon
pushed a commit
to bluesmoon/boomerang
that referenced
this issue
Apr 2, 2015
I'm trying to build a totally static site so as to be able to serve all pages from cache. In order to do that, I'm thinking about getting boomerang's user_ip value from a cookie. I'd ideally set it in a header, but I can't find any way to read the header within Javascript. By doing so, I can have the varnish server set the user's ip in a Set-Cookie header, and keep the whole site in varnish.
So far I've got varnish setting the header. I've got a solid handle on how to get the value from document.cookie, although I'm still wrapping my head around ipv6 compatibility.
Any feedback before I charge ahead? Am I barking up the wrong tree?
Cheers - Callum.
The text was updated successfully, but these errors were encountered: