Utils.js: fix cookie handling
Use unsecure cookie foör testing.
This commit is contained in:
parent
9f49fe1d5d
commit
f484eed3c2
@ -295,8 +295,6 @@ fn get_index() -> BoxFut {
|
||||
let resp = Response::builder()
|
||||
.status(StatusCode::OK)
|
||||
.header(header::CONTENT_TYPE, "text/html")
|
||||
// emulate succssful login, so that Proxmox:Utils.authOk() returns true
|
||||
.header(header::SET_COOKIE, "PBSAuthCookie=\"XXX\"") // fixme: remove
|
||||
.body(index.into())
|
||||
.unwrap();
|
||||
|
||||
|
@ -9,7 +9,10 @@ Ext.define('PBS.Utils', {
|
||||
updateLoginData: function(data) {
|
||||
Proxmox.CSRFPreventionToken = data.CSRFPreventionToken;
|
||||
Proxmox.UserName = data.username;
|
||||
Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
|
||||
console.log(data.ticket);
|
||||
// fixme: use secure flag once we have TLS
|
||||
//Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, true );
|
||||
Ext.util.Cookies.set('PBSAuthCookie', data.ticket, null, '/', null, false);
|
||||
},
|
||||
|
||||
constructor: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user