page3.ssjs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. print = conn.write || print
  2. opts = [
  3. "cgi_pattern",
  4. "cgi_environment",
  5. "put_delete_auth_file",
  6. "cgi_interpreter",
  7. "protect_uri",
  8. "authentication_domain",
  9. "ssi_pattern",
  10. "throttle",
  11. "access_log_file",
  12. "enable_directory_listing",
  13. "error_log_file",
  14. "global_auth_file",
  15. "index_files",
  16. "enable_keep_alive",
  17. "access_control_list",
  18. "extra_mime_types",
  19. "listening_ports",
  20. "document_root",
  21. "fallback_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. "fallback_websocket_root",
  36. "lua_websocket_pattern",
  37. "access_control_allow_origin",
  38. "error_pages",
  39. "_unknown__option"
  40. ]
  41. // send a header
  42. print('HTTP/1.0 200 OK\r\n');
  43. print('Content-Type: text/html\r\n');
  44. print('\r\n');
  45. print("<html><body>\n");
  46. print("<p>This example page is generated by the ");
  47. print('<a href="https://github.com/civetweb/civetweb">CivetWeb web server</a>');
  48. print(" with server side javascript.</p>\n");
  49. for (var i=0; i < opts.length; i++) {
  50. var o = opts[i];
  51. var n = civetweb.getoption(o);
  52. if (typeof(n) == "string") {
  53. print("<p>Option " + o + " = " + n + "</p>\n");
  54. } else {
  55. print("<p>Option " + o + " not known</p>\n");
  56. }
  57. }
  58. print("</body></html>\n");