mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
[JENKINS-49675] Mark the cookie as secure when serving via HTTPS (#5788)
This commit is contained in:
1 parent
0991362366
commit
53d690c28e
1 file changed
+8
-5
@@ -44,11 +44,14 @@ THE SOFTWARE.
|
||||
<l:header>
|
||||
<!-- for screen resolution detection -->
|
||||
<l:yui module="cookie" />
|
||||
<script>
|
||||
YAHOO.util.Cookie.set("screenResolution", screen.width+"x"+screen.height, {
|
||||
path: "/"
|
||||
});
|
||||
</script>
|
||||
<script id="screenResolution-script" data-use-secure-cookie="${request.secure}">
|
||||
var selfScript = document.querySelector('#screenResolution-script');
|
||||
var secureCookie = selfScript.getAttribute('data-use-secure-cookie');
|
||||
YAHOO.util.Cookie.set("screenResolution", screen.width+"x"+screen.height, {
|
||||
path: "/",
|
||||
secure: secureCookie === 'true'
|
||||
});
|
||||
</script>
|
||||
</l:header>
|
||||
</l:layout>
|
||||
</st:compress>
|
||||
Reference in new issue
Block a user