mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-09-30 08:10:56 +02:00
Logoff Cookie Authentication in the example
This commit is contained in:
@@ -23,9 +23,10 @@ Use latest ESP core lib (from Github)
|
||||
|
||||
//See https://github.com/me-no-dev/ESPAsyncWebServer/pull/684
|
||||
#define USE_AUTH_COOKIE
|
||||
#define MY_COOKIE_FULL "LLKQ=7;max-age=31536000;"
|
||||
#define MY_COOKIE_DEL "LLKQ="
|
||||
#define MY_COOKIE "LLKQ=7"
|
||||
// 1 year age, path helps Safari to unset
|
||||
#define MY_COOKIE_FULL "LLKQ=3; Max-Age=31536000; Path=/;"
|
||||
#define MY_COOKIE_DEL "LLKQ=; Max-Age=-1; Path=/;"
|
||||
#define MY_COOKIE "LLKQ=3"
|
||||
|
||||
#ifndef USE_AUTH_COOKIE
|
||||
#define USE_AUTH_STAT //Base Auth for stat, /commands and SPIFFSEditor
|
||||
|
@@ -329,6 +329,7 @@
|
||||
<div id="g2" class="gauge"></div>
|
||||
<div id="C" class="clk" onclick="getBtime();"></div>
|
||||
<div id="C2" class="clk2"></div>
|
||||
<p><a href="/login">Logoff</a></p>
|
||||
</div>
|
||||
|
||||
<script src="app.min.js"></script>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<br><br>
|
||||
<h4>Password</h4>
|
||||
<form action="/lg2n" method="post">
|
||||
<input type="password" name="pa2w">
|
||||
<input type="password" name="pa2w"><br><br>
|
||||
<input type="checkbox" name="lg0f"><label for="lg0f">Logoff</label><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form></center>
|
||||
|
Reference in New Issue
Block a user