Xymon Mailing List Archive search

Chrome cookie deprecations (fix/workaround)

list John Thurston
Tue, 19 Jun 2018 11:55:45 -0800
Message-Id: <user-fb0c002ca606@xymon.invalid>

This works well, Erik. Thank you! I offer the following, which I think makes it even better.

Rather than stuffing this directly into the stdnormal_footer template file, go to xymonserver.cfg and adjust the value of XYMONBODYFOOTER.
XYMONBODYFOOTER="<script type="text/javascript"> var metas = document.getElementsByTagName('meta'); for (var i=0; i<metas.length; i++) { var type = metas[i].getAttribute("HTTP-EQUIV"); if (type == "Set-Cookie") { var prop = metas[i].getAttribute("CONTENT"); document.cookie = prop; } } </script>"                                    # HTML inserted at the bottom of all webpages.
I already had special stuff in my footer, so I appended (inside the double quotes) the new text to what was already there.

--
    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska