diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/civetweb/examples/_obsolete/docroot/login.html | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/civetweb/examples/_obsolete/docroot/login.html')
-rw-r--r-- | src/civetweb/examples/_obsolete/docroot/login.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/civetweb/examples/_obsolete/docroot/login.html b/src/civetweb/examples/_obsolete/docroot/login.html new file mode 100644 index 000000000..2b09f01c5 --- /dev/null +++ b/src/civetweb/examples/_obsolete/docroot/login.html @@ -0,0 +1,43 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr"> + <!-- This file is part of the Civetweb project, + http://sourceforge.net/projects/civetweb/ --> + <head> + <title>Civetweb chat: login</title> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> + <!-- + Note that this page is self-sufficient, it does not load any other + CSS or Javascript file. This is done so because only this page is + allowed for non-authorized users. If we want to load other files + from the frontend, we need to change backend code to allow those + for non-authorized users. See chat.c :: must_authorize() function. + --> + </head> + + <script> + window.onload = function() { + // Set correct action for the login form. We assume that the SSL port + // is the next one to insecure one. + var httpsPort = location.protocol.match(/https/) ? location.port : + parseInt(location.port) + 1; + document.forms[0].action = 'https://' + location.hostname + ':' + + httpsPort + '/authorize'; + }; + </script> + + <body> + <center> + <h2>Civetweb chat server login</h2> + <div style="max-width: 30em;"> + Username and password can be any non-empty strings. + </div> + <br/> + <form> + <input type="text" name="user"></input><br/> + <input type="text" name="password"></input><br/> + <input type="submit" value="Login"></input> + </form> + </center> + </body> +</html> |