X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fhttpthread.cpp;h=55f82b92116413911eab7ee86a43683f485a06fd;hb=18b45335ba24f3b6b6d4f4acfe8c5a5ae845ce00;hp=a58044c429a43b834e58bbe91d54382c08eada9d;hpb=ee580d19b7920904587e18d72a3465d52eab6204;p=fms.git diff --git a/src/http/httpthread.cpp b/src/http/httpthread.cpp index a58044c..55f82b9 100644 --- a/src/http/httpthread.cpp +++ b/src/http/httpthread.cpp @@ -14,6 +14,8 @@ #include "../../include/http/pages/peermaintenancepage.h" #include "../../include/http/pages/execquerypage.h" #include "../../include/http/pages/boardspage.h" +#include "../../include/http/pages/insertedfilespage.h" +#include "../../include/http/pages/confirmpage.h" #include @@ -29,6 +31,9 @@ HTTPThread::HTTPThread() Option::Instance()->Get("HTTPListenPort",portstr); StringFunctions::Convert(portstr,port); + std::string aclstr; + Option::Instance()->Get("HTTPAccessControl",aclstr); + // set template templatestr="Home

Could not find template.htm! Place in program directory and restart!


[CONTENT]"; FILE *infile=fopen("template.htm","r+b"); @@ -60,12 +65,15 @@ HTTPThread::HTTPThread() m_pagehandlers.push_back(new PeerMaintenancePage(templatestr)); m_pagehandlers.push_back(new ExecQueryPage(templatestr)); m_pagehandlers.push_back(new BoardsPage(templatestr)); + m_pagehandlers.push_back(new InsertedFilesPage(templatestr)); + m_pagehandlers.push_back(new ConfirmPage(templatestr)); // homepage must be last - catch all page handler m_pagehandlers.push_back(new HomePage(templatestr)); m_ctx=0; - m_ctx=shttpd_init(NULL,"listen_ports",portstr.c_str(),NULL); - shttpd_listen(m_ctx,port,false); + m_ctx=shttpd_init(); + shttpd_set_option(m_ctx,"ports",portstr.c_str()); + shttpd_set_option(m_ctx,"acl",aclstr.c_str()); shttpd_register_uri(m_ctx,"*",HTTPThread::PageCallback,this);