page3.ssjs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. "_unknown__option"
  38. ]
  39. // send a header
  40. print('HTTP/1.0 200 OK\r\n');
  41. print('Content-Type: text/html\r\n');
  42. print('\r\n');
  43. print("<html><body>\n");
  44. print("<p>This example page is generated by the ");
  45. print('<a href="https://github.com/civetweb/civetweb">CivetWeb web server</a>');
  46. print(" with server side javascript.</p>\n");
  47. for (var i=0; i < opts.length; i++) {
  48. var o = opts[i];
  49. var n = civetweb.getoption(o);
  50. if (typeof(n) == "string") {
  51. print("<p>Option " + o + " = " + n + "</p>\n");
  52. } else {
  53. print("<p>Option " + o + " not known</p>\n");
  54. }
  55. }
  56. print("</body></html>\n");