page3.ssjs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. "ssl_certificate",
  22. "num_threads",
  23. "run_as_user",
  24. "url_rewrite_patterns",
  25. "hide_files_patterns",
  26. "request_timeout_ms",
  27. "websocket_timeout_ms",
  28. "decode_url",
  29. "lua_preload_file",
  30. "lua_script_pattern",
  31. "lua_server_page_pattern",
  32. "_experimental_duktape_script_pattern",
  33. "websocket_root",
  34. "lua_websocket_pattern",
  35. "access_control_allow_origin",
  36. "error_pages"
  37. ]
  38. // send a header
  39. print('HTTP/1.0 200 OK\r\n');
  40. print('Content-Type: text/html\r\n');
  41. print('\r\n');
  42. print("<html><body>\n");
  43. print("<p>This example page is generated by the ");
  44. print('<a href="https://github.com/civetweb/civetweb">CivetWeb web server</a>');
  45. print(" with server side javascript.</p>\n");
  46. for (var i=0; i < opts.length; i++) {
  47. var o = opts[i];
  48. var n = civetweb.getoption(o);
  49. if (typeof(n) == "string") {
  50. print("<p>Option " + o + " = " + n + "</p>\n");
  51. } else {
  52. print("<p>Option " + o + " not set</p>\n");
  53. }
  54. }
  55. print("</body></html>\n");