Skip to content

Commit

Permalink
Clean: add a few comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored and bjoernricks committed Sep 19, 2023
1 parent 8394bb4 commit bf877e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gsad_http_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,18 +763,25 @@ make_url_handlers ()

url_handlers = url_handler_new ("^/(img|js|css|locales)/.+$",
http_handler_new (handle_static_file));

// Add simpler handlers.

url_handler_add_func (url_handlers, "^/robots\\.txt$", handle_static_file);

url_handler_add_func (url_handlers, "^/config\\.*js$", handle_static_config);
url_handler_add_func (url_handlers, "^/static/(img|js|css|media)/.+$",
handle_static_file);
url_handler_add_func (url_handlers, "^/manual/.+$", handle_static_file);

// Create /gmp handler.

gmp_handler = http_handler_new (handle_setup_user);
http_handler_add (gmp_handler, http_handler_new (handle_setup_credentials));
http_handler_add (gmp_handler, http_handler_new (handle_gmp_get));
gmp_url_handler = url_handler_new ("^/gmp$", gmp_handler);

// Create /system_report handler.

system_report_handler = http_handler_new (handle_setup_user);
http_handler_add (system_report_handler,
http_handler_new (handle_setup_credentials));
Expand All @@ -783,10 +790,14 @@ make_url_handlers ()
system_report_url_handler = url_handler_new ("^/system_report/.+$",
system_report_handler);

// Create /logout handler.

logout_handler = http_handler_new (handle_get_user);
http_handler_add (logout_handler, http_handler_new (handle_logout));
logout_url_handler = url_handler_new ("^/logout/?$", logout_handler);

// Add the handlers.

http_handler_add (url_handlers, gmp_url_handler);
http_handler_add (url_handlers, system_report_url_handler);
http_handler_add (url_handlers, logout_url_handler);
Expand Down

0 comments on commit bf877e6

Please sign in to comment.