mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-11-14 03:49:48 +01:00
fix cookie big
This commit is contained in:
parent
453b4310e2
commit
64b090ee05
3 changed files with 11 additions and 5 deletions
|
@ -166,7 +166,7 @@ class captcha{
|
|||
$key,
|
||||
[
|
||||
"expires" => time() + 86400, // expires in 24 hours
|
||||
"samesite" => "Strict",
|
||||
"samesite" => "Lax",
|
||||
"path" => "/"
|
||||
]
|
||||
);
|
||||
|
|
|
@ -278,7 +278,7 @@ foreach($loop as $key => $value){
|
|||
"",
|
||||
[
|
||||
"expires" => -1, // removes cookie
|
||||
"samesite" => "Strict",
|
||||
"samesite" => "Lax",
|
||||
"path" => "/"
|
||||
]
|
||||
);
|
||||
|
@ -303,7 +303,8 @@ foreach($loop as $key => $value){
|
|||
$value,
|
||||
[
|
||||
"expires" => strtotime("+400 days"), // maximal cookie ttl in chrome
|
||||
"samesite" => "Strict"
|
||||
"samesite" => "Lax",
|
||||
"path" => "/"
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -767,7 +767,12 @@ if(searchbox_wrapper.length !== 0){
|
|||
// make sure we dont fetch same thing twice
|
||||
autocomplete_cache[curvalue] = [];
|
||||
|
||||
var res = await fetch("/api/v1/ac?s=" + encodeURIComponent(curvalue) + ac_req_appendix);
|
||||
var res = await fetch("/api/v1/ac?s=" + (encodeURIComponent(curvalue).replaceAll("%20", "+")) + ac_req_appendix);
|
||||
if(!res.ok){
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var json = await res.json();
|
||||
|
||||
autocomplete_cache[curvalue] = json[1];
|
||||
|
@ -802,7 +807,7 @@ if(searchbox_wrapper.length !== 0){
|
|||
ac_func = null;
|
||||
getac(); // get results after 100ms of no keystroke
|
||||
resolve();
|
||||
}, 300);
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue