X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fhttpthread.cpp;h=22fc9302b848a8f3dd0a6b35567eda24761a4694;hp=a58044c429a43b834e58bbe91d54382c08eada9d;hb=1dee4e3cd008a27789bbce05b0eb47b0eb5d121a;hpb=3dc3ac3cfe10b7196a7977e9c041c29fa141c35e diff --git a/src/http/httpthread.cpp b/src/http/httpthread.cpp index a58044c..22fc930 100644 --- a/src/http/httpthread.cpp +++ b/src/http/httpthread.cpp @@ -29,6 +29,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"); @@ -64,8 +67,9 @@ HTTPThread::HTTPThread() 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);