1print = conn.write || print
2
3opts = [
4"cgi_pattern",
5"cgi_environment",
6"put_delete_auth_file",
7"cgi_interpreter",
8"protect_uri",
9"authentication_domain",
10"ssi_pattern",
11"throttle",
12"access_log_file",
13"enable_directory_listing",
14"error_log_file",
15"global_auth_file",
16"index_files",
17"enable_keep_alive",
18"access_control_list",
19"extra_mime_types",
20"listening_ports",
21"document_root",
22"ssl_certificate",
23"num_threads",
24"run_as_user",
25"url_rewrite_patterns",
26"hide_files_patterns",
27"request_timeout_ms",
28"websocket_timeout_ms",
29"decode_url",
30"lua_preload_file",
31"lua_script_pattern",
32"lua_server_page_pattern",
33"_experimental_duktape_script_pattern",
34"websocket_root",
35"lua_websocket_pattern",
36"access_control_allow_origin",
37"error_pages",
38"_unknown__option"
39]
40
41// send a header
42print('HTTP/1.0 200 OK\r\n');
43print('Content-Type: text/html\r\n');
44print('\r\n');
45
46print("<html><body>\n");
47print("<p>This example page is generated by the ");
48print('<a href="https://github.com/civetweb/civetweb">CivetWeb web server</a>');
49print(" with server side javascript.</p>\n");
50
51for (var i=0; i < opts.length; i++) {
52  var o = opts[i];
53  var n = civetweb.getoption(o);
54  if (typeof(n) == "string") {
55    print("<p>Option " + o + " = " + n + "</p>\n");
56  } else {
57    print("<p>Option " + o + " not known</p>\n");
58  }
59}
60
61print("</body></html>\n");
62