Skip to content

Commit 5e4fb4f

Browse files
committed
use Lax cookies
There were some weird cases were the browser would not send the cookie on the first request.
1 parent 35d3c3c commit 5e4fb4f

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

apache/botcheck.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
RewriteRule ^/botcheck-confirm$ / [L,R=303,E=BOTCHECK_CONFIRM:1]
1515

1616
# Set cookie for confirmed users
17-
Header always set Set-Cookie "botcheck=1; Max-Age=2592000; Path=/; SameSite=Strict" env=BOTCHECK_CONFIRM
17+
Header always set Set-Cookie "botcheck=1; Max-Age=2592000; Path=/; SameSite=Lax" env=BOTCHECK_CONFIRM
1818

1919
# The botcheck page, served with 402 status code when direct access is denied
2020
Alias /botcheck ${BOTCHECK_DIR}/botcheck.html

apache/botcheck.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h1>Are you Human?</h1>
7777
// Set cookie for 30 days
7878
const expires = new Date();
7979
expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000));
80-
document.cookie = "botcheck=1; expires=" + expires.toUTCString() + "; path=/; SameSite=Strict";
80+
document.cookie = "botcheck=1; expires=" + expires.toUTCString() + "; path=/; SameSite=Lax";
8181

8282
// Reload the page to continue with original request
8383
window.location.reload();

apache/useragents.ri.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
^curl/.+
22
^Wget/.+
33
DokuWiki HTTP Client
4+
^DokuWikiVersionFix/1\.0$

0 commit comments

Comments
 (0)