mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
- yweb: re-introduce 'WebsiteMain.hosted_directory'
* this directory can be used to host some of your cracy stuff. yhtm, yjs and ysh will also parsed now. it is reachable with <boxip>/hosted/ * if exist a subdir named 'logos' in this directory you can use this as an external logo-dir for yweb too * path can be configured with '--with-hosted_httpddir=PATH'
This commit is contained in:
@@ -65,6 +65,14 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) {
|
||||
hh->status = HANDLED_NONE;
|
||||
|
||||
log_level_printf(4, "mod_sendfile prepare hook start url:%s\n", hh->UrlData["fullurl"].c_str());
|
||||
|
||||
#ifdef Y_CONFIG_USE_HOSTEDWEB
|
||||
// for hosted webs: rewrite URL
|
||||
std::string _hosted=HOSTEDDOCUMENTURL;
|
||||
if((hh->UrlData["path"]).compare(0,_hosted.length(),HOSTEDDOCUMENTURL) == 0) // hosted Web ?
|
||||
hh->UrlData["path"]=hh->WebserverConfigList["WebsiteMain.hosted_directory"]+(hh->UrlData["path"]).substr(_hosted.length()-1);
|
||||
#endif //Y_CONFIG_USE_HOSTEDWEB
|
||||
|
||||
std::string mime = sendfileTypes[hh->UrlData["fileext"]];
|
||||
if (((mime != "") || (hh->WebserverConfigList["mod_sendfile.sendAll"] == "true"))
|
||||
&& !(hh->UrlData["fileext"] == "yhtm" || hh->UrlData["fileext"] == "yjs" || hh->UrlData["fileext"] == "ysh")) {
|
||||
|
Reference in New Issue
Block a user