mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added docs to the folder serve nodes.
This commit is contained in:
parent
d4a636c15d
commit
4bd9975350
@ -6,6 +6,18 @@
|
||||
|
||||
#include "folder_serve_node.h"
|
||||
|
||||
// On top of serving the files from the folder set to it's serve_folder property,
|
||||
// this class also generates HTML directory lists. (Similar to apache's directory listing)
|
||||
// It caches folder contents on ENTER_TREE, it does not watch for folder changes yet.
|
||||
|
||||
// if (should_render_menu) -> render_menu(request)
|
||||
// <div class="file_list">
|
||||
// <div class="file_list_entry"><a href="/files/">..</a></div>
|
||||
// <div class="file_list_entry"><a href="/files/test_folder/">(Folder) test_folder</a></div>
|
||||
// <div class="file_list_entry"><a href="/files/test_file.md">(File) test_file.md</a></div>
|
||||
// ...
|
||||
// </div>
|
||||
|
||||
class BrowsableFolderServeNode : public FolderServeNode {
|
||||
RCPP_OBJECT(BrowsableFolderServeNode, FolderServeNode);
|
||||
|
||||
|
@ -6,6 +6,11 @@
|
||||
#include "web/file_cache.h"
|
||||
#include "web/http/web_node.h"
|
||||
|
||||
// This class will serve the files from the folder set to it's serve_folder property.
|
||||
// It will cache the folder's contents on ENTER_TREE, and will match against the cached list,
|
||||
// this means directory walking (for example sending http://webapp.com/files/../../../etc/passwd),
|
||||
// and other techniques like it should not be possible.
|
||||
|
||||
class FolderServeNode : public WebNode {
|
||||
RCPP_OBJECT(FolderServeNode, WebNode);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user