[httpd] Serve index.html if requested source is a directory

Defaults to an index.html file instead of redirecting to admin.html. It
will not redirect to index.html, but instead serve the file (if exists)
directly. This allows nicer uris in the webinterface.

We will still redirect to admin.html if no index.html is found for
requests to http://ip:port/
This commit is contained in:
chme
2018-02-24 09:59:51 +01:00
parent 8012be596e
commit a764fb3c52
2 changed files with 52 additions and 57 deletions

View File

@@ -145,11 +145,6 @@ httpd_send_error(struct evhttp_request *req, int error, const char *reason);
void
httpd_redirect_to_admin(struct evhttp_request *req);
/*
* Redirects to [uri]/index.html
*/
void
httpd_redirect_to_index(struct evhttp_request *req, const char *uri);
bool
httpd_admin_check_auth(struct evhttp_request *req);